summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/stream.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/serialize/stream.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/serialize/stream.rs')
-rw-r--r--openpgp/src/serialize/stream.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index 389b6d90..6c6d2c78 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -1717,13 +1717,13 @@ mod test {
// literal.finalize().unwrap();
}
- for &read_len in [
+ for &read_len in &[
37,
Encryptor::AEAD_CHUNK_SIZE - 1,
Encryptor::AEAD_CHUNK_SIZE,
100 * Encryptor::AEAD_CHUNK_SIZE
- ].into_iter() {
- for &do_err in [ false, true ].into_iter() {
+ ] {
+ for &do_err in &[ false, true ] {
let mut msg = msg.clone();
if do_err {
let l = msg.len() - 1;