Skip to content

Commit bdd8e7f

Browse files
committed
Update Duration::as_secs doc example to demonstrate truncation.
1 parent ee8ad8e commit bdd8e7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/time/duration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ impl Duration {
125125
/// ```
126126
/// use std::time::Duration;
127127
///
128-
/// let five_seconds = Duration::new(5, 0);
129-
/// assert_eq!(five_seconds.as_secs(), 5);
128+
/// let duration = Duration::new(5, 730023852);
129+
/// assert_eq!(duration.as_secs(), 5);
130130
/// ```
131131
#[stable(feature = "duration", since = "1.3.0")]
132132
#[inline]

0 commit comments

Comments
 (0)