diff options
Diffstat (limited to 'src/libtime')
| -rw-r--r-- | src/libtime/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs index 4453034fe06..e293c547944 100644 --- a/src/libtime/lib.rs +++ b/src/libtime/lib.rs @@ -77,7 +77,13 @@ mod imp { /// A record specifying a time value in seconds and nanoseconds. #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable, Show)] -pub struct Timespec { pub sec: i64, pub nsec: i32 } +pub struct Timespec { + pub sec: i64, + pub nsec: i32, +} + +impl Copy for Timespec {} + /* * Timespec assumes that pre-epoch Timespecs have negative sec and positive * nsec fields. Darwin's and Linux's struct timespec functions handle pre- @@ -269,6 +275,8 @@ pub struct Tm { pub tm_nsec: i32, } +impl Copy for Tm {} + pub fn empty_tm() -> Tm { Tm { tm_sec: 0_i32, @@ -428,6 +436,8 @@ pub enum ParseError { UnexpectedCharacter(char, char), } +impl Copy for ParseError {} + impl Show for ParseError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { |
