Avoid unneeded calls to .as_slice().

This commit is contained in:
Dan Gohman
2017-09-01 10:12:23 -07:00
parent 9d2fbdae62
commit fe12fe0e63
4 changed files with 17 additions and 31 deletions

View File

@@ -649,7 +649,7 @@ impl Solver {
|v| v.from != v.to,
));
dbg!("collect_moves: {}", DisplayList(self.moves.as_slice()));
dbg!("collect_moves: {}", DisplayList(&self.moves));
}
/// Try to schedule a sequence of `regmove` instructions that will shuffle registers into
@@ -751,8 +751,8 @@ impl fmt::Display for Solver {
" assignments: {}",
DisplayList(self.assignments.as_slice())
)?;
writeln!(f, " vars: {}", DisplayList(self.vars.as_slice()))?;
writeln!(f, " moves: {}", DisplayList(self.moves.as_slice()))?;
writeln!(f, " vars: {}", DisplayList(&self.vars))?;
writeln!(f, " moves: {}", DisplayList(&self.moves))?;
writeln!(f, "}}")
}
}