diff --git a/core/http/src/status.rs b/core/http/src/status.rs index f90e40f2..1aa882f4 100644 --- a/core/http/src/status.rs +++ b/core/http/src/status.rs @@ -112,7 +112,7 @@ impl StatusClass { /// } /// # } /// ``` -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Status { /// The HTTP status code associated with this status. pub code: u16, @@ -354,32 +354,6 @@ impl fmt::Display for Status { } } -impl std::hash::Hash for Status { - fn hash(&self, state: &mut H) { - self.code.hash(state) - } -} - -impl PartialEq for Status { - fn eq(&self, other: &Self) -> bool { - self.code.eq(&other.code) - } -} - -impl Eq for Status { } - -impl PartialOrd for Status { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for Status { - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.code.cmp(&other.code) - } -} - #[cfg(feature = "serde")] mod serde_impl { use super::*;