Optimization for bool's PartialOrd impl
This commit is contained in:
parent
1f7762b4fc
commit
777ca999a9
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue