summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-29 08:57:51 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:16 +0300
commit618aa1d65d9748a0f66fbb1be0a7509544d53c2f (patch)
tree9c12c3bcb6434e47d6c39ac200a441d316f721e7 /openpgp/src/parse.rs
parent3e1cb18dae463a5b72f3a4c9ebcfe9a05c19fee3 (diff)
Allow if conditions that use complex code
An if condition is an expression and can be as complex as the programmer wants. However, the more complex a condition is, the harder it tends to be to understand. I marked functions with such if conditions so that clippy won't complain about the code. I probably should have simplified the code, perhaps by extracting the condition to its own function, but it would have been much harder to do, so I didn't. Found by clippy lint blocks_in_if_conditions: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index 11f2f3e3..55489be7 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -1874,6 +1874,7 @@ impl OnePassSig {
impl_parse_generic_packet!(OnePassSig);
impl OnePassSig3 {
+ #[allow(clippy::blocks_in_if_conditions)]
fn parse<'a, T: 'a + BufferedReader<Cookie>>(mut php: PacketHeaderParser<T>)
-> Result<PacketParser<'a>>
{