From f346308cda4cd5a7dae0327a757fe41f064a2161 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Sep 2023 12:19:07 -0700 Subject: [PATCH] Elaborate on documentation of Number::as_str --- src/number.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/number.rs b/src/number.rs index 9e319e8f5..b0231a87b 100644 --- a/src/number.rs +++ b/src/number.rs @@ -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`, returns + /// the JSON representation that serde\_json would serialize for this + /// number. /// /// ``` /// # use serde_json::Number;