From b58658248165c9cf6dfb37c4b713b9e831192512 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Fri, 15 Aug 2014 07:23:51 -0700 Subject: [PATCH] Derive Clone for std::time::Duration This is needed to derive Clone for types containing Durations. --- src/libstd/time/duration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index 545d1f2aab4..155dfbc66c0 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -38,7 +38,7 @@ macro_rules! try_opt( // FIXME #16466: This could be represented as (i64 seconds, u32 nanos) /// ISO 8601 time duration with nanosecond precision. /// This also allows for the negative duration; see individual methods for details. -#[deriving(PartialEq, Eq, PartialOrd, Ord)] +#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct Duration { days: i32, secs: u32, // Always < SECS_PER_DAY