Skip to content

Commit

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

Fix rust-lang#80034.
  • Loading branch information
Dylan-DPC authored Dec 16, 2020
2 parents 0cda9cd + 777ca99 commit c6f081a
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 c6f081a

Please sign in to comment.