diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-28 10:38:43 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:14 +0300 |
commit | 48b1bb5324a63bb4688a4cba206cb39b83ce1783 (patch) | |
tree | b7d767d29524e1179ad5887df01abcd8c1be09ef | |
parent | 271fa11b31706b83509b21a4231015cb660ba8f1 (diff) |
Tell clippy it's OK not to implement traits
Certain method names are typically provided by traits, and it can be
confusing to readers when a method uses that name without the type
implementing the trait. Mark the cases we have to tell clippy these
cases are OK. Implementing the corresponding traits would have changed
API so I opted not to do that.
Found by clippy lint new_without_default:
https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
-rw-r--r-- | openpgp/src/cert/parser/mod.rs | 1 | ||||
-rw-r--r-- | openpgp/src/parse/packet_pile_parser.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs index 15afbdd9..c384be1f 100644 --- a/openpgp/src/cert/parser/mod.rs +++ b/openpgp/src/cert/parser/mod.rs @@ -602,6 +602,7 @@ impl<'a> Parse<'a, CertParser<'a>> for CertParser<'a> } } +#[allow(clippy::should_implement_trait)] impl<'a> CertParser<'a> { /// Creates a `CertParser` from a `Result<Packet>` iterator. /// diff --git a/openpgp/src/parse/packet_pile_parser.rs b/openpgp/src/parse/packet_pile_parser.rs index 8523330a..10c90ea0 100644 --- a/openpgp/src/parse/packet_pile_parser.rs +++ b/openpgp/src/parse/packet_pile_parser.rs @@ -245,6 +245,7 @@ impl<'a> Parse<'a, PacketPileParser<'a>> for PacketPileParser<'a> { } } +#[allow(clippy::should_implement_trait)] impl<'a> PacketPileParser<'a> { /// Creates a `PacketPileParser` from a *fresh* `PacketParser`. fn from_packet_parser(ppr: PacketParserResult<'a>) |