From cdc9e16fb2aef0156d6af4abe3e519c22efa230e Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Tue, 22 Sep 2020 00:45:53 +0200 Subject: 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 --- ipc/src/keygrip.rs | 2 +- ipc/src/sexp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ipc') 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. } } } -- cgit v1.2.3