Skip to content

Commit

Permalink
Fix Duration::subsec_millis and Duration::subsec_micros examples
Browse files Browse the repository at this point in the history
  • Loading branch information
overvenus committed Jan 12, 2018
1 parent 73ac5d6 commit 7cad7f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/time/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl Duration {
///
/// let duration = Duration::from_millis(5432);
/// assert_eq!(duration.as_secs(), 5);
/// assert_eq!(duration.subsec_nanos(), 432_000_000);
/// assert_eq!(duration.subsec_millis(), 432);
/// ```
#[unstable(feature = "duration_extras", issue = "46507")]
#[inline]
Expand All @@ -226,7 +226,7 @@ impl Duration {
///
/// let duration = Duration::from_micros(1_234_567);
/// assert_eq!(duration.as_secs(), 1);
/// assert_eq!(duration.subsec_nanos(), 234_567_000);
/// assert_eq!(duration.subsec_micros(), 234_567);
/// ```
#[unstable(feature = "duration_extras", issue = "46507")]
#[inline]
Expand Down

0 comments on commit 7cad7f6

Please sign in to comment.