mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
minor cleanup of documentation for Value::as_number
This commit is contained in:
parent
b438004775
commit
2cd5d59cd1
@ -507,7 +507,7 @@ impl Value {
|
||||
/// assert_eq!(v["a"].as_number().unwrap(), &Number::from(1u64));
|
||||
///
|
||||
/// // The number `2.2` is an f64.
|
||||
/// assert_eq!(v["b"].as_number().unwrap(), &Number::from_f64(2.2f64).unwrap());
|
||||
/// assert_eq!(v["b"].as_number().unwrap(), &Number::from_f64(2.2).unwrap());
|
||||
///
|
||||
/// // The number `-3` is an i64.
|
||||
/// assert_eq!(v["c"].as_number().unwrap(), &Number::from(-3i64));
|
||||
|
Loading…
x
Reference in New Issue
Block a user