Skip to content

Commit

Permalink
revert removal of Null and Bool in cmp_value
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuel Pilz <[email protected]>
  • Loading branch information
emonadeo committed Aug 12, 2024
1 parent 19fafba commit 3d723a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ciborium/src/value/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub fn cmp_value(v1: &Value, v2: &Value) -> Ordering {
Ordering::Equal => s.cmp(o),
x => x,
},
(Bool(s), Bool(o)) => s.cmp(o),
(Null, Null) => Ordering::Equal,
(Tag(t, v), Tag(ot, ov)) => match Value::from(*t).partial_cmp(&Value::from(*ot)) {
Some(Ordering::Equal) | None => match v.partial_cmp(ov) {
Some(x) => x,
Expand Down

0 comments on commit 3d723a1

Please sign in to comment.