@@ -71,42 +71,42 @@ pub fn free_host<T>(ptr: *mut T) {
7171}
7272
7373impl From < i32 > for AfError {
74- fn from ( t : i32 ) -> AfError {
74+ fn from ( t : i32 ) -> Self {
7575 assert ! ( AfError :: SUCCESS as i32 <= t && t <= AfError :: ERR_UNKNOWN as i32 ) ;
7676 unsafe { mem:: transmute ( t) }
7777 }
7878}
7979
8080impl From < u32 > for DType {
81- fn from ( t : u32 ) -> DType {
81+ fn from ( t : u32 ) -> Self {
8282 assert ! ( DType :: F32 as u32 <= t && t <= DType :: U64 as u32 ) ;
8383 unsafe { mem:: transmute ( t) }
8484 }
8585}
8686
8787impl From < u32 > for InterpType {
88- fn from ( t : u32 ) -> InterpType {
88+ fn from ( t : u32 ) -> Self {
8989 assert ! ( InterpType :: NEAREST as u32 <= t && t <= InterpType :: BICUBIC_SPLINE as u32 ) ;
9090 unsafe { mem:: transmute ( t) }
9191 }
9292}
9393
9494impl From < u32 > for ConvMode {
95- fn from ( t : u32 ) -> ConvMode {
95+ fn from ( t : u32 ) -> Self {
9696 assert ! ( ConvMode :: DEFAULT as u32 <= t && t <= ConvMode :: EXPAND as u32 ) ;
9797 unsafe { mem:: transmute ( t) }
9898 }
9999}
100100
101101impl From < u32 > for ConvDomain {
102- fn from ( t : u32 ) -> ConvDomain {
102+ fn from ( t : u32 ) -> Self {
103103 assert ! ( ConvDomain :: AUTO as u32 <= t && t <= ConvDomain :: FREQUENCY as u32 ) ;
104104 unsafe { mem:: transmute ( t) }
105105 }
106106}
107107
108108impl From < u32 > for MatchType {
109- fn from ( t : u32 ) -> MatchType {
109+ fn from ( t : u32 ) -> Self {
110110 assert ! ( MatchType :: SAD as u32 <= t && t <= MatchType :: SHD as u32 ) ;
111111 unsafe { mem:: transmute ( t) }
112112 }
@@ -129,7 +129,7 @@ pub fn to_u32(t: MatProp) -> u32 {
129129}
130130
131131impl From < u32 > for ColorMap {
132- fn from ( t : u32 ) -> ColorMap {
132+ fn from ( t : u32 ) -> Self {
133133 assert ! ( ColorMap :: DEFAULT as u32 <= t && t <= ColorMap :: BLUE as u32 ) ;
134134 unsafe { mem:: transmute ( t) }
135135 }
0 commit comments