diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-10-01 12:06:14 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-10-02 15:09:10 +0200 |
commit | 46f9d859b56cfbbf8a0e41d76f2d0abaa055b73d (patch) | |
tree | 25cfaa36095be4568119fa555c14be84738b8a5f /openpgp/src/policy.rs | |
parent | 23cb4b184b8c710d5c54bd45dbad206d59ae36b3 (diff) |
openpgp: Rename Cert::merge_packets to Cert::insert_packets.
- This is closer to collection types such as HashMap, and
distinguishes the function from Cert::merge that merges two
certificates.
- See #572.
Diffstat (limited to 'openpgp/src/policy.rs')
-rw-r--r-- | openpgp/src/policy.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs index b8546cf3..14c54ed7 100644 --- a/openpgp/src/policy.rs +++ b/openpgp/src/policy.rs @@ -1092,7 +1092,7 @@ mod test { assert_eq!(revocation.typ(), SignatureType::CertificationRevocation); // Now merge the revocation signature into the Cert. - let cert = cert.merge_packets(revocation.clone())?; + let cert = cert.insert_packets(revocation.clone())?; // Check that it is revoked. assert_eq!(cert.userids().with_policy(p, None).revoked(false).count(), 0); @@ -1128,7 +1128,7 @@ mod test { // Now merge the revocation signature into the Cert. assert_eq!(cert.keys().with_policy(p, None).revoked(false).count(), 3); - let cert = cert.merge_packets(revocation.clone())?; + let cert = cert.insert_packets(revocation.clone())?; assert_eq!(cert.keys().with_policy(p, None).revoked(false).count(), 2); // Reject all subkey revocations. @@ -1372,7 +1372,7 @@ mod test { &mut keypair, ReasonForRevocation::KeyCompromised, b"It was the maid :/")?; - let cert_revoked = cert.clone().merge_packets(rev)?; + let cert_revoked = cert.clone().insert_packets(rev)?; match cert_revoked.revocation_status(&DEFAULT, None) { RevocationStatus::Revoked(sigs) => { @@ -1517,7 +1517,7 @@ mod test { .sign_subkey_binding(&mut pk.clone().into_keypair()?, &pk, &subkey)?; - let cert = cert.merge_packets( + let cert = cert.insert_packets( vec![ Packet::from(subkey), binding.into() ])?; assert_eq!(cert.keys().with_policy(p, None).count(), 3); @@ -1540,7 +1540,7 @@ mod test { .sign_subkey_binding(&mut pk.clone().into_keypair()?, &pk, &subkey)?; - let cert = cert.merge_packets( + let cert = cert.insert_packets( vec![ Packet::from(subkey), binding.into() ])?; assert_eq!(cert.keys().with_policy(p, None).count(), 3); |