summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-11-22 16:18:48 +0100
committerNora Widdecke <nora@sequoia-pgp.org>2021-11-29 11:53:55 +0100
commit8b272c162ce443e26c89afbda6fe4e06dd366118 (patch)
treef9f49ae3f222f8b307861a67056154ffd55fff55 /openpgp/src/serialize.rs
parent0b7bff7337dd94422faf0a3172180ec8c28b1545 (diff)
Remove unnecessary slicing.
- Found by clippy::redundant_slicing.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index 3f124004..1f1f4f89 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -3038,7 +3038,7 @@ mod test {
let data = crate::tests::message(filename);
// 2. Parse the message.
- let pile = PacketPile::from_bytes(&data[..]).unwrap();
+ let pile = PacketPile::from_bytes(data).unwrap();
// The following test only works if the message has a
// single top-level packet.
@@ -3059,7 +3059,7 @@ mod test {
// 4. Modulo the body length encoding, check that the
// reserialized content is identical to the original data.
- packets_bitwise_compare(filename, p, &data[..], &buffer[..]);
+ packets_bitwise_compare(filename, p, data, &buffer[..]);
}
}
@@ -3080,14 +3080,14 @@ mod test {
let data = crate::tests::message(filename);
// 2. Parse the message.
- let u = Packet::Unknown(to_unknown_packet(&data[..]).unwrap());
+ let u = Packet::Unknown(to_unknown_packet(data).unwrap());
// 3. Serialize the packet it into a local buffer.
let data2 = (&u as &dyn MarshalInto).to_vec().unwrap();
// 4. Modulo the body length encoding, check that the
// reserialized content is identical to the original data.
- packets_bitwise_compare(filename, &u, &data[..], &data2[..]);
+ packets_bitwise_compare(filename, &u, data, &data2[..]);
}
}
@@ -3125,7 +3125,7 @@ mod test {
// never recurse so that the resulting message only
// contains the top-level packets. Any containers will
// have their raw content stored in packet.content.
- let pile = PacketParserBuilder::from_bytes(&data[..]).unwrap()
+ let pile = PacketParserBuilder::from_bytes(data).unwrap()
.max_recursion_depth(0)
.buffer_unread_content()
//.trace()