mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Fix bad partial ord implementation
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8fc4fa6f10
commit
48ae6611f6
@ -71,19 +71,20 @@ impl PartialEq for ComponentInfo {
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd for ComponentInfo {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
|
||||
self.priority.partial_cmp(&other.priority)
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for ComponentInfo {}
|
||||
|
||||
impl Ord for ComponentInfo {
|
||||
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
|
||||
self.priority.cmp(&other.priority)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd for ComponentInfo {
|
||||
fn partial_cmp(&self, other: &ComponentInfo) -> Option<core::cmp::Ordering> {
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for ComponentInfo {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("ComponentInfo")
|
||||
|
Reference in New Issue
Block a user