summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-11 11:35:35 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-11 14:32:13 +0200
commitb914ce71ee71477fb6e9cefc916ece157943917d (patch)
treeee8126395a952d39cf7a20038265ceb8d4192902 /openpgp/src/serialize.rs
parentc325bd5eee79cd83cc844e2dc7957aac4897ca61 (diff)
openpgp: Mark S2K as non-exhaustive to allow future extensions.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index 8dc45808..502bbbcf 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -1257,6 +1257,7 @@ impl Marshal for S2K {
&S2K::Private(s2k) | &S2K::Unknown(s2k) => {
w.write_all(&[s2k])?;
}
+ S2K::__Nonexhaustive => unreachable!(),
}
Ok(())
@@ -1271,6 +1272,7 @@ impl MarshalInto for S2K {
&S2K::Salted{ .. } => 2 + 8,
&S2K::Iterated{ .. } => 2 + 8 + 1,
&S2K::Private(_) | &S2K::Unknown(_) => 1,
+ S2K::__Nonexhaustive => unreachable!(),
}
}