diff --git a/axum/src/response/sse.rs b/axum/src/response/sse.rs index 679e03d1..ef955bce 100644 --- a/axum/src/response/sse.rs +++ b/axum/src/response/sse.rs @@ -382,25 +382,19 @@ impl EventFlags { const HAS_ID: Self = Self::from_bits(0b1000); const fn bits(&self) -> u8 { - let bits = self; - bits.0 + self.0 } const fn from_bits(bits: u8) -> Self { - let bits = bits; Self(bits) } const fn contains(&self, other: Self) -> bool { - let same = self; - let other = other; - same.bits() & other.bits() == other.bits() + self.bits() & other.bits() == other.bits() } fn insert(&mut self, other: Self) { - let same = self; - let other = other; - *same = Self::from_bits(same.bits() | other.bits()); + *self = Self::from_bits(self.bits() | other.bits()); } } diff --git a/axum/src/routing/method_filter.rs b/axum/src/routing/method_filter.rs index 227ad7bc..ccd3ae31 100644 --- a/axum/src/routing/method_filter.rs +++ b/axum/src/routing/method_filter.rs @@ -32,14 +32,11 @@ impl MethodFilter { } const fn from_bits(bits: u16) -> Self { - let bits = bits; Self(bits) } pub(crate) const fn contains(&self, other: Self) -> bool { - let same = self; - let other = other; - same.bits() & other.bits() == other.bits() + self.bits() & other.bits() == other.bits() } /// Performs the OR operation between the [`MethodFilter`] in `self` with `other`.