@@ -27,19 +27,19 @@ use instance::Py;
2727use python:: { Python , ToPyPointer } ;
2828
2929// Traits
30- pub trait PyDateComponentAccess {
30+ pub trait PyDateAccess {
3131 fn get_year ( & self ) -> u32 ;
3232 fn get_month ( & self ) -> u32 ;
3333 fn get_day ( & self ) -> u32 ;
3434}
3535
36- pub trait PyDeltaComponentAccess {
36+ pub trait PyDeltaAccess {
3737 fn get_days ( & self ) -> i32 ;
3838 fn get_seconds ( & self ) -> i32 ;
3939 fn get_microseconds ( & self ) -> i32 ;
4040}
4141
42- pub trait PyTimeComponentAccess {
42+ pub trait PyTimeAccess {
4343 fn get_hour ( & self ) -> u32 ;
4444 fn get_minute ( & self ) -> u32 ;
4545 fn get_second ( & self ) -> u32 ;
@@ -73,7 +73,7 @@ impl PyDate {
7373 }
7474}
7575
76- impl PyDateComponentAccess for PyDate {
76+ impl PyDateAccess for PyDate {
7777 fn get_year ( & self ) -> u32 {
7878 unsafe { PyDateTime_GET_YEAR ( self . as_ptr ( ) ) as u32 }
7979 }
@@ -138,7 +138,7 @@ impl PyDateTime {
138138 }
139139}
140140
141- impl PyDateComponentAccess for PyDateTime {
141+ impl PyDateAccess for PyDateTime {
142142 fn get_year ( & self ) -> u32 {
143143 unsafe { PyDateTime_GET_YEAR ( self . as_ptr ( ) ) as u32 }
144144 }
@@ -152,7 +152,7 @@ impl PyDateComponentAccess for PyDateTime {
152152 }
153153}
154154
155- impl PyTimeComponentAccess for PyDateTime {
155+ impl PyTimeAccess for PyDateTime {
156156 fn get_hour ( & self ) -> u32 {
157157 unsafe { PyDateTime_DATE_GET_HOUR ( self . as_ptr ( ) ) as u32 }
158158 }
@@ -231,7 +231,7 @@ impl PyTime {
231231 }
232232}
233233
234- impl PyTimeComponentAccess for PyTime {
234+ impl PyTimeAccess for PyTime {
235235 fn get_hour ( & self ) -> u32 {
236236 unsafe { PyDateTime_TIME_GET_HOUR ( self . as_ptr ( ) ) as u32 }
237237 }
@@ -283,7 +283,7 @@ impl PyDelta {
283283 }
284284}
285285
286- impl PyDeltaComponentAccess for PyDelta {
286+ impl PyDeltaAccess for PyDelta {
287287 fn get_days ( & self ) -> i32 {
288288 unsafe { PyDateTime_DELTA_GET_DAYS ( self . as_ptr ( ) ) as i32 }
289289 }
0 commit comments