From c1b84bd9af2c7dd4a721502ab1bc929bd0f60ce2 Mon Sep 17 00:00:00 2001 From: Milo Mirate Date: Tue, 2 Jun 2026 17:08:18 +0000 Subject: [PATCH] chore(method): impl PartialOrd + Ord --- src/method.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/method.rs b/src/method.rs index 3f2c6bcb..fc535d4f 100644 --- a/src/method.rs +++ b/src/method.rs @@ -187,6 +187,20 @@ impl AsRef for Method { } } +impl Ord for Method { + #[inline] + fn cmp(&self, other: &Method) -> std::cmp::Ordering { + self.as_ref().cmp(other.as_ref()) + } +} + +impl PartialOrd for Method { + #[inline] + fn partial_cmp(&self, other: &Method) -> Option { + Some(self.cmp(other)) + } +} + impl PartialEq<&Method> for Method { #[inline] fn eq(&self, other: &&Method) -> bool {