@@ -76,14 +76,12 @@ mod imp {
7676}
7777
7878/// A record specifying a time value in seconds and nanoseconds.
79- #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord , Encodable , Decodable , Show ) ]
79+ #[ deriving( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Encodable , Decodable , Show ) ]
8080pub struct Timespec {
8181 pub sec : i64 ,
8282 pub nsec : i32 ,
8383}
8484
85- impl Copy for Timespec { }
86-
8785/*
8886 * Timespec assumes that pre-epoch Timespecs have negative sec and positive
8987 * nsec fields. Darwin's and Linux's struct timespec functions handle pre-
@@ -268,7 +266,7 @@ pub fn tzset() {
268266/// also called a broken-down time value.
269267// FIXME: use c_int instead of i32?
270268#[ repr( C ) ]
271- #[ deriving( Clone , PartialEq , Eq , Show ) ]
269+ #[ deriving( Clone , Copy , PartialEq , Eq , Show ) ]
272270pub struct Tm {
273271 /// Seconds after the minute - [0, 60]
274272 pub tm_sec : i32 ,
@@ -309,8 +307,6 @@ pub struct Tm {
309307 pub tm_nsec : i32 ,
310308}
311309
312- impl Copy for Tm { }
313-
314310pub fn empty_tm ( ) -> Tm {
315311 Tm {
316312 tm_sec : 0_i32 ,
@@ -452,7 +448,7 @@ impl Tm {
452448 }
453449}
454450
455- #[ deriving( PartialEq ) ]
451+ #[ deriving( Copy , PartialEq ) ]
456452pub enum ParseError {
457453 InvalidSecond ,
458454 InvalidMinute ,
@@ -470,8 +466,6 @@ pub enum ParseError {
470466 UnexpectedCharacter ( char , char ) ,
471467}
472468
473- impl Copy for ParseError { }
474-
475469impl Show for ParseError {
476470 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
477471 match * self {
0 commit comments