summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/hash.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/crypto/hash.rs')
-rw-r--r--openpgp/src/crypto/hash.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/openpgp/src/crypto/hash.rs b/openpgp/src/crypto/hash.rs
index 10ed9787..b78f1a20 100644
--- a/openpgp/src/crypto/hash.rs
+++ b/openpgp/src/crypto/hash.rs
@@ -490,11 +490,12 @@ impl Signature4 {
// This code assumes that the signature has been verified
// prior to being confirmed, so it is well-formed.
- let mut body = Vec::new();
- body.push(self.version());
- body.push(self.typ().into());
- body.push(self.pk_algo().into());
- body.push(self.hash_algo().into());
+ let mut body = vec![
+ self.version(),
+ self.typ().into(),
+ self.pk_algo().into(),
+ self.hash_algo().into(),
+ ];
// The hashed area.
let l = self.hashed_area().serialized_len()