Skip to content

Commit 170b997

Browse files
committed
Remove nonsense feature gating
This feature gating is nonsense, I wrote it in commit: `cbee9781e8 Move unit types to units` before I understood that `std::string::String` is a re-export of `alloc::string::String`. Remove the nonsense feature gating. This patch has zero effect on the logic.
1 parent 6b9104f commit 170b997

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

units/src/parse.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ macro_rules! impl_tryfrom_str_from_int_infallible {
149149
#[macro_export]
150150
macro_rules! impl_parse_str_from_int_infallible {
151151
($to:ident, $inner:ident, $fn:ident) => {
152-
#[cfg(all(feature = "alloc", not(feature = "std")))]
153-
$crate::impl_tryfrom_str_from_int_infallible!(&str, $to, $inner, $fn; alloc::string::String, $to, $inner, $fn; alloc::boxed::Box<str>, $to, $inner, $fn);
154-
#[cfg(feature = "std")]
155-
$crate::impl_tryfrom_str_from_int_infallible!(&str, $to, $inner, $fn; std::string::String, $to, $inner, $fn; std::boxed::Box<str>, $to, $inner, $fn);
152+
$crate::impl_tryfrom_str_from_int_infallible!(&str, $to, $inner, $fn);
153+
#[cfg(feature = "alloc")]
154+
$crate::impl_tryfrom_str_from_int_infallible!(alloc::string::String, $to, $inner, $fn; alloc::boxed::Box<str>, $to, $inner, $fn);
156155

157156
impl core::str::FromStr for $to {
158157
type Err = $crate::parse::ParseIntError;

0 commit comments

Comments
 (0)