Skip to content

Commit 93f1c67

Browse files
Rollup merge of #80035 - ChayimFriedman2:patch-1, r=nagisa
Optimization for bool's PartialOrd impl Fix #80034.
2 parents 53af116 + 777ca99 commit 93f1c67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ mod impls {
12361236
impl PartialOrd for bool {
12371237
#[inline]
12381238
fn partial_cmp(&self, other: &bool) -> Option<Ordering> {
1239-
(*self as u8).partial_cmp(&(*other as u8))
1239+
Some(self.cmp(other))
12401240
}
12411241
}
12421242

0 commit comments

Comments
 (0)