Skip to content

Commit

Permalink
Enable feature duration_constants in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Stjepan Glavina committed Feb 21, 2019
1 parent f223c03 commit c6d24cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libcore/time.rs
Expand Up @@ -64,6 +64,7 @@ impl Duration {
/// # Examples
///
/// ```
/// #![feature(duration_constants)]
/// use std::time::Duration;
///
/// assert_eq!(Duration::SECOND, Duration::from_secs(1));
Expand All @@ -76,6 +77,7 @@ impl Duration {
/// # Examples
///
/// ```
/// #![feature(duration_constants)]
/// use std::time::Duration;
///
/// assert_eq!(Duration::MILLISECOND, Duration::from_millis(1));
Expand All @@ -88,6 +90,7 @@ impl Duration {
/// # Examples
///
/// ```
/// #![feature(duration_constants)]
/// use std::time::Duration;
///
/// assert_eq!(Duration::MICROSECOND, Duration::from_micros(1));
Expand All @@ -100,6 +103,7 @@ impl Duration {
/// # Examples
///
/// ```
/// #![feature(duration_constants)]
/// use std::time::Duration;
///
/// assert_eq!(Duration::NANOSECOND, Duration::from_nanos(1));
Expand Down

0 comments on commit c6d24cd

Please sign in to comment.