@@ -172,7 +172,7 @@ pub trait FromBytes: Sized {
172172}
173173
174174macro_rules! float_to_from_bytes_impl {
175- ( $T: ty, $I : ty , $ L: expr) => {
175+ ( $T: ty, $L: expr) => {
176176 #[ cfg( has_float_to_from_bytes) ]
177177 impl ToBytes for $T {
178178 type Bytes = [ u8 ; $L] ;
@@ -219,17 +219,17 @@ macro_rules! float_to_from_bytes_impl {
219219
220220 #[ inline]
221221 fn to_be_bytes( & self ) -> Self :: Bytes {
222- <$I as ToBytes > :: to_be_bytes( & self . to_bits( ) )
222+ ToBytes :: to_be_bytes( & self . to_bits( ) )
223223 }
224224
225225 #[ inline]
226226 fn to_le_bytes( & self ) -> Self :: Bytes {
227- <$I as ToBytes > :: to_le_bytes( & self . to_bits( ) )
227+ ToBytes :: to_le_bytes( & self . to_bits( ) )
228228 }
229229
230230 #[ inline]
231231 fn to_ne_bytes( & self ) -> Self :: Bytes {
232- <$I as ToBytes > :: to_ne_bytes( & self . to_bits( ) )
232+ ToBytes :: to_ne_bytes( & self . to_bits( ) )
233233 }
234234 }
235235
@@ -239,17 +239,17 @@ macro_rules! float_to_from_bytes_impl {
239239
240240 #[ inline]
241241 fn from_be_bytes( bytes: & Self :: Bytes ) -> Self {
242- Self :: from_bits( <$I as FromBytes > :: from_be_bytes( & bytes) )
242+ Self :: from_bits( FromBytes :: from_be_bytes( bytes) )
243243 }
244244
245245 #[ inline]
246246 fn from_le_bytes( bytes: & Self :: Bytes ) -> Self {
247- Self :: from_bits( <$I as FromBytes > :: from_le_bytes( & bytes) )
247+ Self :: from_bits( FromBytes :: from_le_bytes( bytes) )
248248 }
249249
250250 #[ inline]
251251 fn from_ne_bytes( bytes: & Self :: Bytes ) -> Self {
252- Self :: from_bits( <$I as FromBytes > :: from_ne_bytes( & bytes) )
252+ Self :: from_bits( FromBytes :: from_ne_bytes( bytes) )
253253 }
254254 }
255255 } ;
@@ -359,8 +359,8 @@ int_to_from_bytes_impl!(isize, 8);
359359#[ cfg( target_pointer_width = "32" ) ]
360360int_to_from_bytes_impl ! ( isize , 4 ) ;
361361
362- float_to_from_bytes_impl ! ( f32 , u32 , 4 ) ;
363- float_to_from_bytes_impl ! ( f64 , u64 , 8 ) ;
362+ float_to_from_bytes_impl ! ( f32 , 4 ) ;
363+ float_to_from_bytes_impl ! ( f64 , 8 ) ;
364364
365365#[ cfg( test) ]
366366mod tests {
0 commit comments