Remove 2x superfluous to_vec

This commit is contained in:
François Garillot
2020-07-23 13:45:46 -04:00
parent 4aae404e29
commit 7b11da3bd6
+1 -2
View File
@@ -103,7 +103,7 @@ impl Envelope {
let ciphertext: Vec<u8> = xor_key
.iter()
.zip(plaintext.to_vec().iter())
.zip(plaintext.iter())
.map(|(&x1, &x2)| x1 ^ x2)
.collect();
@@ -143,7 +143,6 @@ impl Envelope {
}
let plaintext: Vec<u8> = xor_key
.to_vec()
.iter()
.zip(self.ciphertext.iter())
.map(|(&x1, &x2)| x1 ^ x2)