diff options
author | Azul <azul@riseup.net> | 2020-11-19 15:12:54 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-11-28 09:12:33 +0100 |
commit | c80d2ab084a021bfa86cb2e4169490a53c8d87fc (patch) | |
tree | 67af2e22d4f3f921c233d0417e742b72f152c974 /net/src/wkd.rs | |
parent | f9787321bf7cea3fbf15a163070123be1fa5761b (diff) |
net: do not implement openpgp::serialize traits for KeyRing
- We might implement it for an iterator over certs at some point.
But in this case a simple `export` function is all we need.
- This will also allow us to seal the `Serialize` and `Marshal` traits.
Diffstat (limited to 'net/src/wkd.rs')
-rw-r--r-- | net/src/wkd.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/src/wkd.rs b/net/src/wkd.rs index 50f4d25e..7c29926b 100644 --- a/net/src/wkd.rs +++ b/net/src/wkd.rs @@ -30,7 +30,7 @@ use sequoia_openpgp::{ Fingerprint, Cert, parse::Parse, - serialize::Marshal, + serialize::Serialize, types::HashAlgorithm, cert::prelude::*, }; @@ -391,17 +391,6 @@ impl KeyRing { } Ok(()) } -} - -impl openpgp::serialize::Serialize for KeyRing {} - -impl Marshal for KeyRing { - fn serialize(&self, o: &mut dyn std::io::Write) -> openpgp::Result<()> { - for cert in self.0.values() { - cert.serialize(o)?; - } - Ok(()) - } fn export(&self, o: &mut dyn std::io::Write) -> openpgp::Result<()> { for cert in self.0.values() { |