summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2020-09-22 00:45:53 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2020-11-06 09:46:53 +0100
commitcdc9e16fb2aef0156d6af4abe3e519c22efa230e (patch)
treef4f5e10029ed7816bcb0931c53d27ed0e21c598c /ipc
parent327a987e2c95ea9d05fcadd6fa7a8c249372affd (diff)
openpgp: Use non_exhaustive attribute.
- Fixes #563 - With an MSRV >= 1.40.0, we can use #[non_exhaustive], as mentioned in #406. - This is also a clippy lint: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
Diffstat (limited to 'ipc')
-rw-r--r--ipc/src/keygrip.rs2
-rw-r--r--ipc/src/sexp.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/ipc/src/keygrip.rs b/ipc/src/keygrip.rs
index c6d01eeb..148c11d7 100644
--- a/ipc/src/keygrip.rs
+++ b/ipc/src/keygrip.rs
@@ -174,7 +174,7 @@ impl Keygrip {
"Keygrip not defined for this kind of public key".into())
.into()),
- __Nonexhaustive => unreachable!(),
+ &_ => unreachable!(), // Ciphertext is non-exhaustive.
}
let mut digest = [0; 20];
diff --git a/ipc/src/sexp.rs b/ipc/src/sexp.rs
index ee376f61..1ca36a04 100644
--- a/ipc/src/sexp.rs
+++ b/ipc/src/sexp.rs
@@ -294,7 +294,7 @@ impl TryFrom<&mpi::Ciphertext> for Sexp {
format!("Don't know how to convert {:?}", ciphertext))
.into()),
- __Nonexhaustive => unreachable!(),
+ &_ => unreachable!(), // Ciphertext is non-exhaustive.
}
}
}