diff options
author | Aaron Hill <aa1ronham@gmail.com> | 2019-10-30 16:09:57 -0400 |
---|---|---|
committer | Paul Woolcock <paul@woolcock.us> | 2020-04-07 12:38:01 -0400 |
commit | 7e3f25dab47269722e1551f77d830042b6b2730d (patch) | |
tree | 6bee97c872ac46e36c59fe039fb670345a8724f3 | |
parent | ac3ecc82b76a2b91f5ffb5309bece02cef51d85f (diff) |
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.
-rw-r--r-- | src/scopes.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scopes.rs b/src/scopes.rs index d780ce1..2cab0d2 100644 --- a/src/scopes.rs +++ b/src/scopes.rs @@ -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(); |