Skip to content

Commit 3083782

Browse files
hamirmahalsharkdp
authored andcommitted
refactor: wrap result of cmp for PartialOrd
1 parent 14eb08e commit 3083782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numbat/src/unit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl UnitIdentifier {
155155

156156
impl PartialOrd for UnitIdentifier {
157157
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
158-
self.sort_key().partial_cmp(&other.sort_key())
158+
Some(self.cmp(other))
159159
}
160160
}
161161

0 commit comments

Comments
 (0)