Implement the render send of integer literals.

This commit is contained in:
Tom Alexander
2020-05-10 23:11:16 -04:00
parent 79099a8654
commit 9ee8f41022
3 changed files with 42 additions and 0 deletions

View File

@@ -151,6 +151,11 @@ impl CompareContextElement for serde_json::Value {
None => (),
Some(other_string) => return self.as_str().map_or(false, |s| s == other_string),
}
// Handle numeric literals
match other.to_any().downcast_ref::<u64>() {
None => (),
Some(other_num) => return self.as_u64().map_or(false, |n| n == *other_num),
}
false
}
}