diff options
author | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-29 15:19:11 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:20 +0300 |
commit | fb1cbb2c31537c6e24d70ce44a00a28e3281f37b (patch) | |
tree | bf0877716e3c9e6469b36d57900b4c114075abc0 | |
parent | 347e9519954b1a7702d7120d6c265ea3d82b64cc (diff) |
Annotate functions where single_match is OK
See https://rust-lang.github.io/rust-clippy/master/index.html#single_match
-rw-r--r-- | ffi-macros/src/rust2c.rs | 1 | ||||
-rw-r--r-- | openpgp/src/armor/base64_utils.rs | 1 | ||||
-rw-r--r-- | openpgp/src/parse/stream.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/ffi-macros/src/rust2c.rs b/ffi-macros/src/rust2c.rs index 97ad2b53..44e25978 100644 --- a/ffi-macros/src/rust2c.rs +++ b/ffi-macros/src/rust2c.rs @@ -132,6 +132,7 @@ fn type2c<T: ToTokens>(typ: T) -> String { c_typ } +#[allow(clippy::single_match)] pub fn rust2c(fun: &syn::ItemFn) -> String { let return_type = match &fun.sig.output { syn::ReturnType::Default => "void".into(), diff --git a/openpgp/src/armor/base64_utils.rs b/openpgp/src/armor/base64_utils.rs index aac7ae2a..1b6f97aa 100644 --- a/openpgp/src/armor/base64_utils.rs +++ b/openpgp/src/armor/base64_utils.rs @@ -29,6 +29,7 @@ use crate::{ /// /// This function will stop after it sees base64 padding, and if it /// sees invalid base64 data. +#[allow(clippy::single_match)] pub fn base64_filter(mut bytes: Cow<[u8]>, base64_data_max: usize, mut prefix_remaining: usize, prefix_len: usize) -> (Cow<[u8]>, usize, usize) diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 22dbf9a0..abd9e061 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -2477,6 +2477,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { /// Stashes the given Signature (if it is one) for later /// verification. + #[allow(clippy::single_match)] fn push_sig(&mut self, p: Packet) -> Result<()> { match p { Packet::Signature(sig) => { |