Loop over references to containers instead of using explicit iteration methods.

https://github.com/rust-lang-nursery/rust-clippy/wiki#explicit_iter_loop
This commit is contained in:
Dan Gohman
2017-08-10 13:59:46 -07:00
parent 03698f6bc8
commit 8647b10135
4 changed files with 5 additions and 5 deletions

View File

@@ -492,7 +492,7 @@ impl<'a, Variable> FunctionBuilder<'a, Variable>
fn fill_function_args_values(&mut self, ebb: Ebb) {
debug_assert!(self.pristine);
for argtyp in self.func.signature.argument_types.iter() {
for argtyp in &self.func.signature.argument_types {
self.builder
.function_args_values
.push(self.func.dfg.append_ebb_arg(ebb, argtyp.value_type));

View File

@@ -402,7 +402,7 @@ impl<Variable> SSABuilder<Variable>
};
// For each undef var we look up values in the predecessors and create an Ebb argument
// only if necessary.
for &(var, val) in undef_vars.iter() {
for &(var, val) in &undef_vars {
let (_, mut local_side_effects) =
self.predecessors_lookup(dfg, layout, jts, val, var, ebb, &predecessors);
side_effects