summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-06-11 11:24:44 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-06-11 11:24:44 +0200
commita4d2e75ea6cf56e57aed397720931b22c7d1a123 (patch)
treef5d89ea60a4ae0d69658f8dc09fa21ea5d303243 /openpgp/src/serialize.rs
parent6055a98b431321a9dd2f74eb8bca7c0f0907ce4a (diff)
openpgp: Mark enum Fingerprint as non-exhaustive.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index a67da09d..9c0c79d9 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -837,6 +837,7 @@ impl MarshalInto for Fingerprint {
match self {
Fingerprint::V4(_) => 20,
Fingerprint::Invalid(ref fp) => fp.len(),
+ Fingerprint::__Nonexhaustive => unreachable!(),
}
}
@@ -1456,6 +1457,7 @@ impl MarshalInto for SubpacketValue {
1 + (fp as &dyn MarshalInto).serialized_len(),
// Educated guess for unknown versions.
Fingerprint::Invalid(_) => 1 + fp.as_bytes().len(),
+ Fingerprint::__Nonexhaustive => unreachable!(),
},
PreferredAEADAlgorithms(ref p) => p.len(),
IntendedRecipient(ref fp) => match fp {
@@ -1463,6 +1465,7 @@ impl MarshalInto for SubpacketValue {
1 + (fp as &dyn MarshalInto).serialized_len(),
// Educated guess for unknown versions.
Fingerprint::Invalid(_) => 1 + fp.as_bytes().len(),
+ Fingerprint::__Nonexhaustive => unreachable!(),
},
Unknown { body, .. } => body.len(),
__Nonexhaustive => unreachable!(),