5
5
//!
6
6
//! **Crate features:**
7
7
//!
8
- //! * `"use_std "`
8
+ //! * `"std "`
9
9
//! Enabled by default. Disable to make the library `#![no_std]`.
10
10
//!
11
11
//! * `"serde"`
15
15
#![ doc( html_root_url = "https://docs.rs/either/1/" ) ]
16
16
#![ no_std]
17
17
18
- #[ cfg( any( test, feature = "use_std " ) ) ]
18
+ #[ cfg( any( test, feature = "std " ) ) ]
19
19
extern crate std;
20
20
21
21
#[ cfg( feature = "serde" ) ]
@@ -31,9 +31,9 @@ use core::ops::Deref;
31
31
use core:: ops:: DerefMut ;
32
32
use core:: pin:: Pin ;
33
33
34
- #[ cfg( any( test, feature = "use_std " ) ) ]
34
+ #[ cfg( any( test, feature = "std " ) ) ]
35
35
use std:: error:: Error ;
36
- #[ cfg( any( test, feature = "use_std " ) ) ]
36
+ #[ cfg( any( test, feature = "std " ) ) ]
37
37
use std:: io:: { self , BufRead , Read , Seek , SeekFrom , Write } ;
38
38
39
39
pub use crate :: Either :: { Left , Right } ;
@@ -1154,10 +1154,10 @@ where
1154
1154
}
1155
1155
}
1156
1156
1157
- #[ cfg( any( test, feature = "use_std " ) ) ]
1157
+ #[ cfg( any( test, feature = "std " ) ) ]
1158
1158
/// `Either<L, R>` implements `Read` if both `L` and `R` do.
1159
1159
///
1160
- /// Requires crate feature `"use_std "`
1160
+ /// Requires crate feature `"std "`
1161
1161
impl < L , R > Read for Either < L , R >
1162
1162
where
1163
1163
L : Read ,
@@ -1180,10 +1180,10 @@ where
1180
1180
}
1181
1181
}
1182
1182
1183
- #[ cfg( any( test, feature = "use_std " ) ) ]
1183
+ #[ cfg( any( test, feature = "std " ) ) ]
1184
1184
/// `Either<L, R>` implements `Seek` if both `L` and `R` do.
1185
1185
///
1186
- /// Requires crate feature `"use_std "`
1186
+ /// Requires crate feature `"std "`
1187
1187
impl < L , R > Seek for Either < L , R >
1188
1188
where
1189
1189
L : Seek ,
@@ -1194,8 +1194,8 @@ where
1194
1194
}
1195
1195
}
1196
1196
1197
- #[ cfg( any( test, feature = "use_std " ) ) ]
1198
- /// Requires crate feature `"use_std "`
1197
+ #[ cfg( any( test, feature = "std " ) ) ]
1198
+ /// Requires crate feature `"std "`
1199
1199
impl < L , R > BufRead for Either < L , R >
1200
1200
where
1201
1201
L : BufRead ,
@@ -1218,10 +1218,10 @@ where
1218
1218
}
1219
1219
}
1220
1220
1221
- #[ cfg( any( test, feature = "use_std " ) ) ]
1221
+ #[ cfg( any( test, feature = "std " ) ) ]
1222
1222
/// `Either<L, R>` implements `Write` if both `L` and `R` do.
1223
1223
///
1224
- /// Requires crate feature `"use_std "`
1224
+ /// Requires crate feature `"std "`
1225
1225
impl < L , R > Write for Either < L , R >
1226
1226
where
1227
1227
L : Write ,
@@ -1279,17 +1279,17 @@ macro_rules! impl_specific_ref_and_mut {
1279
1279
impl_specific_ref_and_mut ! ( str , ) ;
1280
1280
impl_specific_ref_and_mut ! (
1281
1281
:: std:: path:: Path ,
1282
- cfg( feature = "use_std " ) ,
1282
+ cfg( feature = "std " ) ,
1283
1283
doc = "Requires crate feature `use_std`."
1284
1284
) ;
1285
1285
impl_specific_ref_and_mut ! (
1286
1286
:: std:: ffi:: OsStr ,
1287
- cfg( feature = "use_std " ) ,
1287
+ cfg( feature = "std " ) ,
1288
1288
doc = "Requires crate feature `use_std`."
1289
1289
) ;
1290
1290
impl_specific_ref_and_mut ! (
1291
1291
:: std:: ffi:: CStr ,
1292
- cfg( feature = "use_std " ) ,
1292
+ cfg( feature = "std " ) ,
1293
1293
doc = "Requires crate feature `use_std`."
1294
1294
) ;
1295
1295
@@ -1345,10 +1345,10 @@ where
1345
1345
}
1346
1346
}
1347
1347
1348
- #[ cfg( any( test, feature = "use_std " ) ) ]
1348
+ #[ cfg( any( test, feature = "std " ) ) ]
1349
1349
/// `Either` implements `Error` if *both* `L` and `R` implement it.
1350
1350
///
1351
- /// Requires crate feature `"use_std "`
1351
+ /// Requires crate feature `"std "`
1352
1352
impl < L , R > Error for Either < L , R >
1353
1353
where
1354
1354
L : Error ,
@@ -1553,7 +1553,7 @@ fn _unsized_ref_propagation() {
1553
1553
}
1554
1554
1555
1555
// This "unused" method is here to ensure that compilation doesn't fail on given types.
1556
- #[ cfg( feature = "use_std " ) ]
1556
+ #[ cfg( feature = "std " ) ]
1557
1557
fn _unsized_std_propagation ( ) {
1558
1558
check_t ! ( :: std:: path:: Path ) ;
1559
1559
check_t ! ( :: std:: ffi:: OsStr ) ;
0 commit comments