Optimization for bool's PartialOrd impl
This commit is contained in:
parent
1f7762b4fc
commit
777ca999a9
@ -1236,7 +1236,7 @@ fn partial_cmp(&self, _: &()) -> Option<Ordering> {
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user