diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-14 23:24:36 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-19 10:51:00 -0500 |
| commit | a77e8a63d5d4c0fa04a878995824e727870135f9 (patch) | |
| tree | c422bcbfb5fe130035b38f2c7eb56e632845ca9a /src/libstd/time | |
| parent | 2df30a47e2e0ef563d9ed80cb3cc258cbea0f53a (diff) | |
| download | rust-a77e8a63d5d4c0fa04a878995824e727870135f9.tar.gz rust-a77e8a63d5d4c0fa04a878995824e727870135f9.zip | |
libstd: use `#[deriving(Copy)]`
Diffstat (limited to 'src/libstd/time')
| -rw-r--r-- | src/libstd/time/duration.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index 85ed27853c4..7cb14e8e4bc 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -13,7 +13,6 @@ #![experimental] use {fmt, i64}; -use kinds::Copy; use ops::{Add, Sub, Mul, Div, Neg, FnOnce}; use option::Option; use option::Option::{Some, None}; @@ -47,7 +46,7 @@ macro_rules! try_opt { /// ISO 8601 time duration with nanosecond precision. /// This also allows for the negative duration; see individual methods for details. -#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)] +#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct Duration { secs: i64, nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC @@ -65,8 +64,6 @@ pub const MAX: Duration = Duration { nanos: (i64::MAX % MILLIS_PER_SEC) as i32 * NANOS_PER_MILLI }; -impl Copy for Duration {} - impl Duration { /// Makes a new `Duration` with given number of weeks. /// Equivalent to `Duration::seconds(weeks * 7 * 24 * 60 * 60), with overflow checks. |
