summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/stream.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-28 10:11:20 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:13 +0300
commit800ccc2149d018d5e29c25e89265c563885f32d0 (patch)
treed3ffd9a88de7d7932ecfa5162a5c54c59d91e9b6 /openpgp/src/serialize/stream.rs
parent18ab269a0e6967d78df8527679f2479c39650250 (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/serialize/stream.rs')
-rw-r--r--openpgp/src/serialize/stream.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index cbfa1117..019138b3 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -530,6 +530,7 @@ pub struct ArbitraryWriter<'a> {
}
assert_send_and_sync!(ArbitraryWriter<'_>);
+#[allow(clippy::new_ret_no_self)]
impl<'a> ArbitraryWriter<'a> {
/// Creates a new writer with the given tag.
///