From 0402e2cdab9a2be643b801494ff78c1f4f3b21e4 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Tue, 19 Aug 2025 07:12:58 +0200 Subject: [PATCH] chore: clippy --- src/log_parser.rs | 4 ++-- src/xr_devices.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/log_parser.rs b/src/log_parser.rs index e0c439c..9d0129f 100644 --- a/src/log_parser.rs +++ b/src/log_parser.rs @@ -107,13 +107,13 @@ impl From<&LogLevel> for u32 { impl PartialOrd for LogLevel { fn partial_cmp(&self, other: &Self) -> Option { - Some(u32::from(self).cmp(&other.into())) + Some(self.cmp(other)) } } impl Ord for LogLevel { fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.partial_cmp(other).unwrap() + u32::from(self).cmp(&other.into()) } } diff --git a/src/xr_devices.rs b/src/xr_devices.rs index 846759f..45ccb9d 100644 --- a/src/xr_devices.rs +++ b/src/xr_devices.rs @@ -207,13 +207,13 @@ impl From<&XRDeviceRole> for u32 { impl PartialOrd for XRDeviceRole { fn partial_cmp(&self, other: &Self) -> Option { - Some(u32::from(self).cmp(&other.into())) + Some(self.cmp(other)) } } impl Ord for XRDeviceRole { fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.partial_cmp(other).unwrap() + u32::from(self).cmp(&other.into()) } }