Skip to content

Commit 8c1ea3e

Browse files
committed
use_std -> std
1 parent d743e25 commit 8c1ea3e

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ categories = ["data-structures", "no-std"]
2121
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc", "derive"] }
2222

2323
[features]
24-
default = ["use_std"]
25-
use_std = []
26-
std = ["use_std"]
24+
default = ["std"]
25+
std = []
26+
use_std = ["std"] # deprecated alias
2727

2828
[dev-dependencies]
2929
serde_json = "1.0.0"

src/lib.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//!
66
//! **Crate features:**
77
//!
8-
//! * `"use_std"`
8+
//! * `"std"`
99
//! Enabled by default. Disable to make the library `#![no_std]`.
1010
//!
1111
//! * `"serde"`
@@ -15,7 +15,7 @@
1515
#![doc(html_root_url = "https://docs.rs/either/1/")]
1616
#![no_std]
1717

18-
#[cfg(any(test, feature = "use_std"))]
18+
#[cfg(any(test, feature = "std"))]
1919
extern crate std;
2020

2121
#[cfg(feature = "serde")]
@@ -31,9 +31,9 @@ use core::ops::Deref;
3131
use core::ops::DerefMut;
3232
use core::pin::Pin;
3333

34-
#[cfg(any(test, feature = "use_std"))]
34+
#[cfg(any(test, feature = "std"))]
3535
use std::error::Error;
36-
#[cfg(any(test, feature = "use_std"))]
36+
#[cfg(any(test, feature = "std"))]
3737
use std::io::{self, BufRead, Read, Seek, SeekFrom, Write};
3838

3939
pub use crate::Either::{Left, Right};
@@ -1154,10 +1154,10 @@ where
11541154
}
11551155
}
11561156

1157-
#[cfg(any(test, feature = "use_std"))]
1157+
#[cfg(any(test, feature = "std"))]
11581158
/// `Either<L, R>` implements `Read` if both `L` and `R` do.
11591159
///
1160-
/// Requires crate feature `"use_std"`
1160+
/// Requires crate feature `"std"`
11611161
impl<L, R> Read for Either<L, R>
11621162
where
11631163
L: Read,
@@ -1180,10 +1180,10 @@ where
11801180
}
11811181
}
11821182

1183-
#[cfg(any(test, feature = "use_std"))]
1183+
#[cfg(any(test, feature = "std"))]
11841184
/// `Either<L, R>` implements `Seek` if both `L` and `R` do.
11851185
///
1186-
/// Requires crate feature `"use_std"`
1186+
/// Requires crate feature `"std"`
11871187
impl<L, R> Seek for Either<L, R>
11881188
where
11891189
L: Seek,
@@ -1194,8 +1194,8 @@ where
11941194
}
11951195
}
11961196

1197-
#[cfg(any(test, feature = "use_std"))]
1198-
/// Requires crate feature `"use_std"`
1197+
#[cfg(any(test, feature = "std"))]
1198+
/// Requires crate feature `"std"`
11991199
impl<L, R> BufRead for Either<L, R>
12001200
where
12011201
L: BufRead,
@@ -1218,10 +1218,10 @@ where
12181218
}
12191219
}
12201220

1221-
#[cfg(any(test, feature = "use_std"))]
1221+
#[cfg(any(test, feature = "std"))]
12221222
/// `Either<L, R>` implements `Write` if both `L` and `R` do.
12231223
///
1224-
/// Requires crate feature `"use_std"`
1224+
/// Requires crate feature `"std"`
12251225
impl<L, R> Write for Either<L, R>
12261226
where
12271227
L: Write,
@@ -1279,17 +1279,17 @@ macro_rules! impl_specific_ref_and_mut {
12791279
impl_specific_ref_and_mut!(str,);
12801280
impl_specific_ref_and_mut!(
12811281
::std::path::Path,
1282-
cfg(feature = "use_std"),
1282+
cfg(feature = "std"),
12831283
doc = "Requires crate feature `use_std`."
12841284
);
12851285
impl_specific_ref_and_mut!(
12861286
::std::ffi::OsStr,
1287-
cfg(feature = "use_std"),
1287+
cfg(feature = "std"),
12881288
doc = "Requires crate feature `use_std`."
12891289
);
12901290
impl_specific_ref_and_mut!(
12911291
::std::ffi::CStr,
1292-
cfg(feature = "use_std"),
1292+
cfg(feature = "std"),
12931293
doc = "Requires crate feature `use_std`."
12941294
);
12951295

@@ -1345,10 +1345,10 @@ where
13451345
}
13461346
}
13471347

1348-
#[cfg(any(test, feature = "use_std"))]
1348+
#[cfg(any(test, feature = "std"))]
13491349
/// `Either` implements `Error` if *both* `L` and `R` implement it.
13501350
///
1351-
/// Requires crate feature `"use_std"`
1351+
/// Requires crate feature `"std"`
13521352
impl<L, R> Error for Either<L, R>
13531353
where
13541354
L: Error,
@@ -1553,7 +1553,7 @@ fn _unsized_ref_propagation() {
15531553
}
15541554

15551555
// This "unused" method is here to ensure that compilation doesn't fail on given types.
1556-
#[cfg(feature = "use_std")]
1556+
#[cfg(feature = "std")]
15571557
fn _unsized_std_propagation() {
15581558
check_t!(::std::path::Path);
15591559
check_t!(::std::ffi::OsStr);

0 commit comments

Comments
 (0)