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.
This commit is contained in:
committed by
Paul Woolcock
parent
ac3ecc82b7
commit
7e3f25dab4
+1
-1
@@ -717,7 +717,7 @@ mod tests {
|
||||
"push".to_string(),
|
||||
];
|
||||
|
||||
let tests = values.into_iter().zip(expecteds.into_iter());
|
||||
let tests = values.iter().zip(expecteds.iter());
|
||||
|
||||
for (value, expected) in tests {
|
||||
let result = value.to_string();
|
||||
|
||||
Reference in New Issue
Block a user