Skip to content

Commit

Permalink
Wrap as_number documentation to 80 columns
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 9, 2023
1 parent de39b2a commit 6a5fef9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ impl Value {
}
}

/// If the `Value` is an Number, returns the associated [`Number`]. Returns None
/// otherwise.
/// If the `Value` is an Number, returns the associated [`Number`]. Returns
/// None otherwise.
///
/// ```
/// # use serde_json::{json, Number};
Expand All @@ -509,7 +509,6 @@ impl Value {
///
/// // The string `"4"` is not a number.
/// assert_eq!(v["d"].as_number(), None);
///
/// ```
pub fn as_number(&self) -> Option<&Number> {
match self {
Expand Down

0 comments on commit 6a5fef9

Please sign in to comment.