Skip to content

Commit

Permalink
Rollup merge of #80035 - ChayimFriedman2:patch-1, r=nagisa
Browse files Browse the repository at this point in the history
Optimization for bool's PartialOrd impl

Fix #80034.
  • Loading branch information
GuillaumeGomez authored Dec 17, 2020
2 parents 53af116 + 777ca99 commit 93f1c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ mod impls {
impl PartialOrd for bool {
#[inline]
fn partial_cmp(&self, other: &bool) -> Option<Ordering> {
(*self as u8).partial_cmp(&(*other as u8))
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit 93f1c67

Please sign in to comment.