@@ -40,6 +40,7 @@ pub mod rustrt {
4040/// A record specifying a time value in seconds and nanoseconds.
4141#[ auto_encode]
4242#[ auto_decode]
43+ #[ deriving( Eq ) ]
4344pub struct Timespec { sec : i64 , nsec : i32 }
4445
4546/*
@@ -57,13 +58,6 @@ pub impl Timespec {
5758 }
5859}
5960
60- impl Eq for Timespec {
61- fn eq ( & self , other : & Timespec ) -> bool {
62- self . sec == other. sec && self . nsec == other. nsec
63- }
64- fn ne ( & self , other : & Timespec ) -> bool { !self . eq ( other) }
65- }
66-
6761impl Ord for Timespec {
6862 fn lt ( & self , other : & Timespec ) -> bool {
6963 self . sec < other. sec ||
@@ -117,6 +111,7 @@ pub fn tzset() {
117111
118112#[ auto_encode]
119113#[ auto_decode]
114+ #[ deriving( Eq ) ]
120115pub struct Tm {
121116 tm_sec : i32 , // seconds after the minute ~[0-60]
122117 tm_min : i32 , // minutes after the hour ~[0-59]
@@ -132,24 +127,6 @@ pub struct Tm {
132127 tm_nsec : i32 , // nanoseconds
133128}
134129
135- impl Eq for Tm {
136- fn eq ( & self , other : & Tm ) -> bool {
137- self . tm_sec == ( * other) . tm_sec &&
138- self . tm_min == ( * other) . tm_min &&
139- self . tm_hour == ( * other) . tm_hour &&
140- self . tm_mday == ( * other) . tm_mday &&
141- self . tm_mon == ( * other) . tm_mon &&
142- self . tm_year == ( * other) . tm_year &&
143- self . tm_wday == ( * other) . tm_wday &&
144- self . tm_yday == ( * other) . tm_yday &&
145- self . tm_isdst == ( * other) . tm_isdst &&
146- self . tm_gmtoff == ( * other) . tm_gmtoff &&
147- self . tm_zone == ( * other) . tm_zone &&
148- self . tm_nsec == ( * other) . tm_nsec
149- }
150- fn ne ( & self , other : & Tm ) -> bool { !self . eq ( other) }
151- }
152-
153130pub fn empty_tm ( ) -> Tm {
154131 Tm {
155132 tm_sec : 0_i32 ,
0 commit comments