Skip to content

Commit

Permalink
Elaborate on documentation of Number::as_str
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 9, 2023
1 parent f16cad6 commit f346308
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/number.rs
Expand Up @@ -279,7 +279,12 @@ impl Number {
}
}

/// Returns the `&str` representation of the `Number`.
/// Returns the exact original JSON representation that this Number was
/// parsed from.
///
/// For numbers constructed not via parsing, such as by `From<i32>`, returns
/// the JSON representation that serde\_json would serialize for this
/// number.
///
/// ```
/// # use serde_json::Number;
Expand Down

0 comments on commit f346308

Please sign in to comment.