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. --- openpgp/src/armor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openpgp/src/armor.rs') diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index 7d1c4102..0a3282a4 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -593,10 +593,10 @@ impl<'a> Reader<'a> { lazy_static!{ static ref START_CHARS : Vec = { let mut valid_start = Vec::new(); - for &tag in [ Tag::PKESK, Tag::SKESK, + for &tag in &[ Tag::PKESK, Tag::SKESK, Tag::OnePassSig, Tag::Signature, Tag::PublicKey, Tag::SecretKey, - Tag::CompressedData, Tag::Literal ].into_iter() { + Tag::CompressedData, Tag::Literal ] { let mut ctb = [ 0u8; 1 ]; let mut o = [ 0u8; 4 ]; -- cgit v1.2.3