From 48cc5f28b158f853c1755ccadb958ce20d8a9007 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Thu, 19 Dec 2019 00:47:33 +0100 Subject: Don't use misleading `<&[T; N] as IntoIterator>::into_iter` See https://github.com/rust-lang/rust/pull/65819. Warned against by default since Rust 1.41. Right now `into_iter` returns references to objects inside an array rather than moving the values (as one would expect) so it makes sense to use `iter()` or for-in-borrowed (which calls the same thing) to retain the behaviour but make it less confusing. --- ffi-macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ffi-macros') diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs index 4d9590dc..e4107c49 100644 --- a/ffi-macros/src/lib.rs +++ b/ffi-macros/src/lib.rs @@ -291,7 +291,7 @@ pub fn ffi_wrapper_type(args: TokenStream, input: TokenStream) -> TokenStream { let default_derives = [ (derive_free as DeriveFn, None), ]; - for (dfn, arg) in derive.iter().chain(default_derives.into_iter()) { + for (dfn, arg) in derive.iter().chain(default_derives.iter()) { impls.extend(dfn(proc_macro2::Span::call_site(), &prefix, &name, &st, &wrapped_type, arg)); } -- cgit v1.2.3