diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-28 10:11:20 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:13 +0300 |
commit | 800ccc2149d018d5e29c25e89265c563885f32d0 (patch) | |
tree | d3ffd9a88de7d7932ecfa5162a5c54c59d91e9b6 /openpgp/src/crypto/backend | |
parent | 18ab269a0e6967d78df8527679f2479c39650250 (diff) |
Allow ::new to not return Self
It is Rust custom that the new method for a type returns an instance
of that type. However, sometimes that's not wanted. Tell clippy that
these cases are OK. I opted to not do this globally, because that
would prevent clippy from catching future cases.
Found by clippy warning new_ret_no_self:
https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
Diffstat (limited to 'openpgp/src/crypto/backend')
-rw-r--r-- | openpgp/src/crypto/backend/nettle/symmetric.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend/nettle/symmetric.rs b/openpgp/src/crypto/backend/nettle/symmetric.rs index b75eaa0d..b9dd2703 100644 --- a/openpgp/src/crypto/backend/nettle/symmetric.rs +++ b/openpgp/src/crypto/backend/nettle/symmetric.rs @@ -13,6 +13,7 @@ struct ModeWrapper<M> iv: Protected, } +#[allow(clippy::new_ret_no_self)] impl<M> ModeWrapper<M> where M: nettle::mode::Mode + Send + Sync + 'static, |