Skip to content

Commit

Permalink
Optimization for bool's PartialOrd impl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChayimFriedman2 committed Dec 14, 2020
1 parent 1f7762b commit 777ca99
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 777ca99

Please sign in to comment.