Closed
Description
#66780 suggested an optimization for impl Ord for bool
, and it was implemented in #66881.
However, for some reason, impl PartialOrd for bool
was not optimized the same way:
Lines 1286 to 1300 in 1f7762b
Lines 1236 to 1241 in 1f7762b
It can be implemented in terms of Ord
:
impl PartialOrd for bool {
#[inline]
fn partial_cmp(&self, other: &bool) -> Option<Ordering> {
Some(self.cmp(other))
}
}
Is this deliberate or just something that no-one noticed?