summaryrefslogtreecommitdiffstats
path: root/buffered-reader
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-28 10:29:08 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:13 +0300
commit271fa11b31706b83509b21a4231015cb660ba8f1 (patch)
tree42045c74446c0fd03ee337d2686472fe49d081c7 /buffered-reader
parent800ccc2149d018d5e29c25e89265c563885f32d0 (diff)
Allow new() without default()
It is customary in Rust to implement the Default trait for types that can have a new method that takes no arguments. However, that's not always wanted. I've marked all the structures that have a new without arguments but don't implement Default, so that if we get more of them, clippy will warn. Found by clippy lint new_without_default: https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
Diffstat (limited to 'buffered-reader')
-rw-r--r--buffered-reader/src/eof.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/buffered-reader/src/eof.rs b/buffered-reader/src/eof.rs
index 6298b52b..08b0a2b6 100644
--- a/buffered-reader/src/eof.rs
+++ b/buffered-reader/src/eof.rs
@@ -20,6 +20,7 @@ impl<C> fmt::Display for EOF<C> {
}
}
+#[allow(clippy::new_without_default)]
impl EOF<()> {
/// Instantiates a new `EOF`.
pub fn new() -> Self {