Skip to content

Commit

Permalink
Rollup merge of rust-lang#47375 - overvenus:duration-examples, r=dtolnay
Browse files Browse the repository at this point in the history
Fix examples of Duration::subsec_millis and Duration::subsec_micros

Update examples of `Duration::subsec_millis` and `Duration::subsec_micros`, because they are not for these two methods actually.
  • Loading branch information
kennytm committed Jan 12, 2018
2 parents 722838f + 7cad7f6 commit 21ac84e
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 21ac84e

Please sign in to comment.