diff --git a/Cargo.toml b/Cargo.toml index d1738cc1ac..7f372a27ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -127,7 +127,6 @@ needless_pass_by_value = "allow" pattern_type_mismatch = "allow" redundant_else = "allow" struct_excessive_bools = "allow" # TODO: bogus lint? -trivially_copy_pass_by_ref = "allow" unnested_or_patterns = "allow" unused_async = "allow" # TODO: is it for API? unused_trait_names = "allow" # TODO: kinda annoying, but might be good to deny diff --git a/src/body/length.rs b/src/body/length.rs index 1ed5e0d031..ba121bde11 100644 --- a/src/body/length.rs +++ b/src/body/length.rs @@ -81,7 +81,7 @@ impl DecodedLength { /// /// It would return false if "chunked" or otherwise size-unknown. #[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))] - pub(crate) fn is_exact(&self) -> bool { + pub(crate) fn is_exact(self) -> bool { self.0 <= MAX_LEN } } diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs index 8a5a734940..1c00f6f774 100644 --- a/src/proto/h1/conn.rs +++ b/src/proto/h1/conn.rs @@ -1068,8 +1068,8 @@ impl KA { *self = KA::Disabled; } - fn status(&self) -> KA { - *self + fn status(self) -> KA { + self } } diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs index 9d8ed7f408..c46a5dba80 100644 --- a/src/proto/h1/decode.rs +++ b/src/proto/h1/decode.rs @@ -301,7 +301,7 @@ impl ChunkedState { ChunkedState::Start } fn step( - &self, + self, cx: &mut Context<'_>, body: &mut R, StepArgs { @@ -318,7 +318,7 @@ impl ChunkedState { Body, BodyCr, BodyLf, End, EndCr, EndLf, Extension, Size, SizeLf, SizeLws, Start, Trailer, TrailerLf, }; - match *self { + match self { Start => ChunkedState::read_start(cx, body, chunk_size), Size => ChunkedState::read_size(cx, body, chunk_size), SizeLws => ChunkedState::read_size_lws(cx, body), diff --git a/src/proto/h1/mod.rs b/src/proto/h1/mod.rs index 344d5a8a4f..37045d6856 100644 --- a/src/proto/h1/mod.rs +++ b/src/proto/h1/mod.rs @@ -108,7 +108,7 @@ impl Wants { Wants(self.0 | other.0) } - fn contains(&self, other: Wants) -> bool { + fn contains(self, other: Wants) -> bool { (self.0 & other.0) == other.0 } }