From 624d5b46feb4b473235b0a7dbad09354049e68ad Mon Sep 17 00:00:00 2001 From: ROMemories <152802150+ROMemories@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:45:07 +0100 Subject: [PATCH] refactor(threading)!: remove `PartialOrd` impl on some types There is no partial order on these types: they are only opaques types which can only be compared for equality. --- src/ariel-os-runqueue/src/runqueue.rs | 2 +- src/ariel-os-threads/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ariel-os-runqueue/src/runqueue.rs b/src/ariel-os-runqueue/src/runqueue.rs index 5a1eaf30f..b318e2d5b 100644 --- a/src/ariel-os-runqueue/src/runqueue.rs +++ b/src/ariel-os-runqueue/src/runqueue.rs @@ -24,7 +24,7 @@ impl From for usize { } } -#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct ThreadId(u8); diff --git a/src/ariel-os-threads/src/lib.rs b/src/ariel-os-threads/src/lib.rs index a131bf01f..a2ccf7582 100644 --- a/src/ariel-os-threads/src/lib.rs +++ b/src/ariel-os-threads/src/lib.rs @@ -470,7 +470,7 @@ impl Scheduler { } /// ID of a physical core. -#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct CoreId(pub(crate) u8);