diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-29 08:57:51 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:16 +0300 |
commit | 618aa1d65d9748a0f66fbb1be0a7509544d53c2f (patch) | |
tree | 9c12c3bcb6434e47d6c39ac200a441d316f721e7 /net | |
parent | 3e1cb18dae463a5b72f3a4c9ebcfe9a05c19fee3 (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 'net')
-rw-r--r-- | net/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs index 74f0ecfb..cf94557a 100644 --- a/net/src/lib.rs +++ b/net/src/lib.rs @@ -289,6 +289,7 @@ impl KeyServer { /// /// Returned certificates must be mistrusted, and be carefully /// interpreted under a policy and trust model. + #[allow(clippy::blocks_in_if_conditions)] pub async fn search<U: Into<UserID>>(&mut self, userid: U) -> Result<Vec<Cert>> { |