@@ -2,6 +2,7 @@ use core::borrow::{Borrow, BorrowMut};
22use core:: cmp:: { Eq , Ord , PartialEq , PartialOrd } ;
33use core:: fmt:: Debug ;
44use core:: hash:: Hash ;
5+ #[ cfg( not( has_int_to_from_bytes) ) ]
56use core:: mem:: transmute;
67
78pub trait NumBytes :
@@ -160,7 +161,7 @@ pub trait FromBytes {
160161
161162macro_rules! float_to_from_bytes_impl {
162163 ( $T: ty, $I: ty, $L: expr) => {
163- #[ cfg( feature = " has_float_to_from_bytes" ) ]
164+ #[ cfg( has_float_to_from_bytes) ]
164165 impl ToBytes for $T {
165166 type Bytes = [ u8 ; $L] ;
166167
@@ -180,7 +181,7 @@ macro_rules! float_to_from_bytes_impl {
180181 }
181182 }
182183
183- #[ cfg( feature = " has_float_to_from_bytes" ) ]
184+ #[ cfg( has_float_to_from_bytes) ]
184185 impl FromBytes for $T {
185186 type Bytes = [ u8 ; $L] ;
186187
@@ -200,7 +201,7 @@ macro_rules! float_to_from_bytes_impl {
200201 }
201202 }
202203
203- #[ cfg( not( feature = " has_float_to_from_bytes" ) ) ]
204+ #[ cfg( not( has_float_to_from_bytes) ) ]
204205 impl ToBytes for $T {
205206 type Bytes = [ u8 ; $L] ;
206207
@@ -220,7 +221,7 @@ macro_rules! float_to_from_bytes_impl {
220221 }
221222 }
222223
223- #[ cfg( not( feature = " has_float_to_from_bytes" ) ) ]
224+ #[ cfg( not( has_float_to_from_bytes) ) ]
224225 impl FromBytes for $T {
225226 type Bytes = [ u8 ; $L] ;
226227
@@ -244,7 +245,7 @@ macro_rules! float_to_from_bytes_impl {
244245
245246macro_rules! int_to_from_bytes_impl {
246247 ( $T: ty, $L: expr) => {
247- #[ cfg( feature = " has_int_to_from_bytes" ) ]
248+ #[ cfg( has_int_to_from_bytes) ]
248249 impl ToBytes for $T {
249250 type Bytes = [ u8 ; $L] ;
250251
@@ -264,7 +265,7 @@ macro_rules! int_to_from_bytes_impl {
264265 }
265266 }
266267
267- #[ cfg( feature = " has_int_to_from_bytes" ) ]
268+ #[ cfg( has_int_to_from_bytes) ]
268269 impl FromBytes for $T {
269270 type Bytes = [ u8 ; $L] ;
270271
@@ -284,7 +285,7 @@ macro_rules! int_to_from_bytes_impl {
284285 }
285286 }
286287
287- #[ cfg( not( feature = " has_int_to_from_bytes" ) ) ]
288+ #[ cfg( not( has_int_to_from_bytes) ) ]
288289 impl ToBytes for $T {
289290 type Bytes = [ u8 ; $L] ;
290291
@@ -304,7 +305,7 @@ macro_rules! int_to_from_bytes_impl {
304305 }
305306 }
306307
307- #[ cfg( not( feature = " has_int_to_from_bytes" ) ) ]
308+ #[ cfg( not( has_int_to_from_bytes) ) ]
308309 impl FromBytes for $T {
309310 type Bytes = [ u8 ; $L] ;
310311
0 commit comments