Skip to content

Commit

Permalink
Update Number::from_i128 documentation regarding bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 18, 2024
1 parent b4df0f8 commit fb12a9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ impl Number {
}
}

/// Converts an `i128` to a `Number`. Greater than u64::MAX values are not JSON
/// numbers.
/// Converts an `i128` to a `Number`. Numbers smaller than i64::MIN or
/// larger than u64::MAX can only be represented in `Number` if serde_json's
/// "arbitrary_precision" feature is enabled.
///
/// ```
/// # use serde_json::Number;
Expand Down

0 comments on commit fb12a9d

Please sign in to comment.