From 3d723a1322f35f86d49bb98e258f7132a90a3153 Mon Sep 17 00:00:00 2001 From: Emanuel Pilz Date: Mon, 12 Aug 2024 03:04:11 +0200 Subject: [PATCH] revert removal of `Null` and `Bool` in `cmp_value` Signed-off-by: Emanuel Pilz --- ciborium/src/value/canonical.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ciborium/src/value/canonical.rs b/ciborium/src/value/canonical.rs index 109faef..823d96a 100644 --- a/ciborium/src/value/canonical.rs +++ b/ciborium/src/value/canonical.rs @@ -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,