Use `slice::iter` instead of `into_iter` to avoid future breakage

`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.
master
Aaron Hill 5 years ago committed by Paul Woolcock
parent ac3ecc82b7
commit 7e3f25dab4
  1. 2
      src/scopes.rs

@ -717,7 +717,7 @@ mod tests {
"push".to_string(), "push".to_string(),
]; ];
let tests = values.into_iter().zip(expecteds.into_iter()); let tests = values.iter().zip(expecteds.iter());
for (value, expected) in tests { for (value, expected) in tests {
let result = value.to_string(); let result = value.to_string();

Loading…
Cancel
Save