From 3bb68623bd32ef1cffd92d10f92f4a0f58cdaa44 Mon Sep 17 00:00:00 2001 From: Lukas Kalbertodt Date: Sat, 21 Dec 2019 12:14:10 +0100 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. --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 3d579f5..4852e5e 100644 --- a/build.rs +++ b/build.rs @@ -9,7 +9,7 @@ fn main() { let force_spin_cfg = is_var_set("CARGO_CFG_LAZY_STATIC_SPIN_IMPL"); let impls_forced = [force_heap_cfg, force_inline_cfg, force_spin_cfg] - .into_iter() + .iter() .filter(|&&f| f) .count();