From fb12a9db76c6233f7cf8517bbed066b37b230665 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 18 Oct 2024 09:27:30 -0700 Subject: [PATCH] Update Number::from_i128 documentation regarding bounds --- src/number.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/number.rs b/src/number.rs index cecad1b4a..242c57926 100644 --- a/src/number.rs +++ b/src/number.rs @@ -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;