summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/src/keygrip.rs6
-rw-r--r--ipc/src/sexp.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/ipc/src/keygrip.rs b/ipc/src/keygrip.rs
index 148c11d7..6d08f70f 100644
--- a/ipc/src/keygrip.rs
+++ b/ipc/src/keygrip.rs
@@ -169,12 +169,12 @@ impl Keygrip {
&ECDSA { ref curve, ref q } => hash_ecc(&mut hash, curve, q),
&ECDH { ref curve, ref q, .. } => hash_ecc(&mut hash, curve, q),
- &Unknown { .. } =>
+ // crypto::mpi::PublicKey is non_exhaustive, match on &_ to handle
+ // future additions.
+ &Unknown { .. } | &_ =>
return Err(Error::InvalidOperation(
"Keygrip not defined for this kind of public key".into())
.into()),
-
- &_ => unreachable!(), // Ciphertext is non-exhaustive.
}
let mut digest = [0; 20];
diff --git a/ipc/src/sexp.rs b/ipc/src/sexp.rs
index 1ca36a04..14d3e4c8 100644
--- a/ipc/src/sexp.rs
+++ b/ipc/src/sexp.rs
@@ -289,12 +289,12 @@ impl TryFrom<&mpi::Ciphertext> for Sexp {
Sexp::String("e".into()),
Sexp::String(e.value().into())])])])),
- &Unknown { .. } =>
+ // crypto::mpi::Ciphertext is non_exhaustive, match on &_ to handle
+ // future additions.
+ &Unknown { .. } | &_ =>
Err(Error::InvalidArgument(
format!("Don't know how to convert {:?}", ciphertext))
.into()),
-
- &_ => unreachable!(), // Ciphertext is non-exhaustive.
}
}
}