diff options
author | Igor Matuszewski <igor@sequoia-pgp.org> | 2019-12-19 00:47:33 +0100 |
---|---|---|
committer | Igor Matuszewski <igor@sequoia-pgp.org> | 2019-12-19 00:47:33 +0100 |
commit | 48cc5f28b158f853c1755ccadb958ce20d8a9007 (patch) | |
tree | 5f781e7316a9d4fe831217e0946e71c36687423f /ffi-macros | |
parent | a0a23c8fc7fd07176751d4a6688d884ab7aa65e0 (diff) |
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.
Diffstat (limited to 'ffi-macros')
-rw-r--r-- | ffi-macros/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |