From 731f235d9eee070bf23c245eb2992c4f699599dd Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 16 May 2020 23:26:33 -0400 Subject: [PATCH] fix greater than. --- src/bin.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/bin.rs b/src/bin.rs index a649562..ac1b409 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -250,22 +250,7 @@ impl CompareContextElement for serde_json::Value { ( serde_json::Value::Number(self_num), OwnedLiteral::LString(other_string), - ) => match ( - self_num.as_u64(), - self_num.as_i64(), - self_num.as_f64(), - ) { - (Some(self_uint), _, _) => { - return self_uint.to_string().partial_cmp(other_string) - } - (_, Some(self_int), _) => { - return self_int.to_string().partial_cmp(other_string) - } - (_, _, Some(self_float)) => { - return self_float.to_string().partial_cmp(other_string) - } - (None, None, None) => panic!("This should be impossible since u64 and i64 can both be converted to floats") - } + ) => return None, ( serde_json::Value::Number(self_num), OwnedLiteral::LPositiveInteger(other_num),