fix greater than.

This commit is contained in:
Tom Alexander 2020-05-16 23:26:33 -04:00
parent 03a8328148
commit 731f235d9e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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),