Skip to content

Commit fc8dd13

Browse files
committed
Touch up PR 1067
1 parent 028b643 commit fc8dd13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/number.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ impl Number {
279279
}
280280
}
281281

282-
#[cfg(feature = "arbitrary_precision")]
283282
/// Returns the `&str` representation of the `Number`.
283+
///
284284
/// ```
285285
/// # use serde_json::Number;
286286
/// for value in [
@@ -294,6 +294,8 @@ impl Number {
294294
/// let number: Number = serde_json::from_str(value).unwrap();
295295
/// assert_eq!(number.as_str(), value);
296296
/// }
297+
/// ```
298+
#[cfg(feature = "arbitrary_precision")]
297299
pub fn as_str(&self) -> &str {
298300
&self.n
299301
}

0 commit comments

Comments
 (0)