@@ -76,14 +76,12 @@ mod imp {
76
76
}
77
77
78
78
/// 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 ) ]
80
80
pub struct Timespec {
81
81
pub sec : i64 ,
82
82
pub nsec : i32 ,
83
83
}
84
84
85
- impl Copy for Timespec { }
86
-
87
85
/*
88
86
* Timespec assumes that pre-epoch Timespecs have negative sec and positive
89
87
* nsec fields. Darwin's and Linux's struct timespec functions handle pre-
@@ -268,7 +266,7 @@ pub fn tzset() {
268
266
/// also called a broken-down time value.
269
267
// FIXME: use c_int instead of i32?
270
268
#[ repr( C ) ]
271
- #[ deriving( Clone , PartialEq , Eq , Show ) ]
269
+ #[ deriving( Clone , Copy , PartialEq , Eq , Show ) ]
272
270
pub struct Tm {
273
271
/// Seconds after the minute - [0, 60]
274
272
pub tm_sec : i32 ,
@@ -309,8 +307,6 @@ pub struct Tm {
309
307
pub tm_nsec : i32 ,
310
308
}
311
309
312
- impl Copy for Tm { }
313
-
314
310
pub fn empty_tm ( ) -> Tm {
315
311
Tm {
316
312
tm_sec : 0_i32 ,
@@ -452,7 +448,7 @@ impl Tm {
452
448
}
453
449
}
454
450
455
- #[ deriving( PartialEq ) ]
451
+ #[ deriving( Copy , PartialEq ) ]
456
452
pub enum ParseError {
457
453
InvalidSecond ,
458
454
InvalidMinute ,
@@ -470,8 +466,6 @@ pub enum ParseError {
470
466
UnexpectedCharacter ( char , char ) ,
471
467
}
472
468
473
- impl Copy for ParseError { }
474
-
475
469
impl Show for ParseError {
476
470
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
477
471
match * self {
0 commit comments