@@ -2,6 +2,7 @@ use core::borrow::{Borrow, BorrowMut};
2
2
use core:: cmp:: { Eq , Ord , PartialEq , PartialOrd } ;
3
3
use core:: fmt:: Debug ;
4
4
use core:: hash:: Hash ;
5
+ #[ cfg( not( has_int_to_from_bytes) ) ]
5
6
use core:: mem:: transmute;
6
7
7
8
pub trait NumBytes :
@@ -160,7 +161,7 @@ pub trait FromBytes {
160
161
161
162
macro_rules! float_to_from_bytes_impl {
162
163
( $T: ty, $I: ty, $L: expr) => {
163
- #[ cfg( feature = " has_float_to_from_bytes" ) ]
164
+ #[ cfg( has_float_to_from_bytes) ]
164
165
impl ToBytes for $T {
165
166
type Bytes = [ u8 ; $L] ;
166
167
@@ -180,7 +181,7 @@ macro_rules! float_to_from_bytes_impl {
180
181
}
181
182
}
182
183
183
- #[ cfg( feature = " has_float_to_from_bytes" ) ]
184
+ #[ cfg( has_float_to_from_bytes) ]
184
185
impl FromBytes for $T {
185
186
type Bytes = [ u8 ; $L] ;
186
187
@@ -200,7 +201,7 @@ macro_rules! float_to_from_bytes_impl {
200
201
}
201
202
}
202
203
203
- #[ cfg( not( feature = " has_float_to_from_bytes" ) ) ]
204
+ #[ cfg( not( has_float_to_from_bytes) ) ]
204
205
impl ToBytes for $T {
205
206
type Bytes = [ u8 ; $L] ;
206
207
@@ -220,7 +221,7 @@ macro_rules! float_to_from_bytes_impl {
220
221
}
221
222
}
222
223
223
- #[ cfg( not( feature = " has_float_to_from_bytes" ) ) ]
224
+ #[ cfg( not( has_float_to_from_bytes) ) ]
224
225
impl FromBytes for $T {
225
226
type Bytes = [ u8 ; $L] ;
226
227
@@ -244,7 +245,7 @@ macro_rules! float_to_from_bytes_impl {
244
245
245
246
macro_rules! int_to_from_bytes_impl {
246
247
( $T: ty, $L: expr) => {
247
- #[ cfg( feature = " has_int_to_from_bytes" ) ]
248
+ #[ cfg( has_int_to_from_bytes) ]
248
249
impl ToBytes for $T {
249
250
type Bytes = [ u8 ; $L] ;
250
251
@@ -264,7 +265,7 @@ macro_rules! int_to_from_bytes_impl {
264
265
}
265
266
}
266
267
267
- #[ cfg( feature = " has_int_to_from_bytes" ) ]
268
+ #[ cfg( has_int_to_from_bytes) ]
268
269
impl FromBytes for $T {
269
270
type Bytes = [ u8 ; $L] ;
270
271
@@ -284,7 +285,7 @@ macro_rules! int_to_from_bytes_impl {
284
285
}
285
286
}
286
287
287
- #[ cfg( not( feature = " has_int_to_from_bytes" ) ) ]
288
+ #[ cfg( not( has_int_to_from_bytes) ) ]
288
289
impl ToBytes for $T {
289
290
type Bytes = [ u8 ; $L] ;
290
291
@@ -304,7 +305,7 @@ macro_rules! int_to_from_bytes_impl {
304
305
}
305
306
}
306
307
307
- #[ cfg( not( feature = " has_int_to_from_bytes" ) ) ]
308
+ #[ cfg( not( has_int_to_from_bytes) ) ]
308
309
impl FromBytes for $T {
309
310
type Bytes = [ u8 ; $L] ;
310
311
0 commit comments