Skip to content

Commit f32e547

Browse files
committed
fix: implement PartialOrd via Ord
Signed-off-by: Martin Kröning <[email protected]>
1 parent d45ab47 commit f32e547

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/volatile_ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ where
7979
T: ?Sized,
8080
{
8181
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
82-
Some(Ord::cmp(&self.pointer.as_ptr(), &other.pointer.as_ptr()))
82+
Some(self.cmp(other))
8383
}
8484
}
8585

src/volatile_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ where
314314
T: ?Sized,
315315
{
316316
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
317-
Some(Ord::cmp(&self.pointer.as_ptr(), &other.pointer.as_ptr()))
317+
Some(self.cmp(other))
318318
}
319319
}
320320

0 commit comments

Comments
 (0)