From 7e3f25dab47269722e1551f77d830042b6b2730d Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 30 Oct 2019 16:09:57 -0400 Subject: [PATCH] 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. --- src/scopes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();