summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-07-28 15:42:06 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-07-28 16:52:41 +0200
commitc5f44ce753f3b56338311b9dc9d1d3de86307fa3 (patch)
treebfdc4e5d1fc5aadd9fdaebe58172eab3b80a95f3 /openpgp/src/serialize.rs
parenta446f7045b3e7e7735127ecf4f7c90ed3550e70f (diff)
openpgp: Reimplement the KeyServerPreferences struct using Bitfield.
- Also improve the documentation of the KSP::no_modify and the corresponding setters. - See #525.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index c220ebcc..e243e906 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -1388,7 +1388,7 @@ impl Marshal for SubpacketValue {
o.write_all(&[(*a).into()])?;
},
KeyServerPreferences(ref p) =>
- o.write_all(&p.to_vec())?,
+ o.write_all(p.as_slice())?,
PreferredKeyServer(ref p) =>
o.write_all(p)?,
PrimaryUserID(p) =>
@@ -1455,7 +1455,7 @@ impl MarshalInto for SubpacketValue {
NotationData(nd) => 4 + 2 + 2 + nd.name().len() + nd.value().len(),
PreferredHashAlgorithms(ref p) => p.len(),
PreferredCompressionAlgorithms(ref p) => p.len(),
- KeyServerPreferences(ref p) => p.to_vec().len(),
+ KeyServerPreferences(ref p) => p.as_slice().len(),
PreferredKeyServer(ref p) => p.len(),
PrimaryUserID(_) => 1,
PolicyURI(ref p) => p.len(),