summaryrefslogtreecommitdiffstats
path: root/openpgp/src/armor.rs
diff options
context:
space:
mode:
authorIgor Matuszewski <igor@sequoia-pgp.org>2019-12-19 00:47:33 +0100
committerIgor Matuszewski <igor@sequoia-pgp.org>2019-12-19 00:47:33 +0100
commit48cc5f28b158f853c1755ccadb958ce20d8a9007 (patch)
tree5f781e7316a9d4fe831217e0946e71c36687423f /openpgp/src/armor.rs
parenta0a23c8fc7fd07176751d4a6688d884ab7aa65e0 (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 'openpgp/src/armor.rs')
-rw-r--r--openpgp/src/armor.rs4
1 files changed, 2 insertions, 2 deletions
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<u8> = {
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 ];