Skip to content

Commit 6a3845a

Browse files
committed
Remove redundant feature tests
ascii_string.rs is not compiled if the alloc feature is not enabled.
1 parent 17ae932 commit 6a3845a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/ascii_string.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ impl AsciiString {
411411
/// Converts this [`AsciiString`] into a [`Box`]`<`[`AsciiStr`]`>`.
412412
///
413413
/// This will drop any excess capacity
414-
#[cfg(feature = "alloc")]
415414
#[inline]
416415
#[must_use]
417416
pub fn into_boxed_ascii_str(self) -> Box<AsciiStr> {
@@ -547,15 +546,13 @@ impl Into<String> for AsciiString {
547546
}
548547
}
549548

550-
#[cfg(feature = "alloc")]
551549
impl From<Box<AsciiStr>> for AsciiString {
552550
#[inline]
553551
fn from(boxed: Box<AsciiStr>) -> Self {
554552
boxed.into_ascii_string()
555553
}
556554
}
557555

558-
#[cfg(feature = "alloc")]
559556
impl From<AsciiString> for Box<AsciiStr> {
560557
#[inline]
561558
fn from(string: AsciiString) -> Self {
@@ -1056,7 +1053,6 @@ mod tests {
10561053
assert!(fmt::write(&mut s2, format_args!("{}", sparkle_heart)).is_err());
10571054
}
10581055

1059-
#[cfg(feature = "alloc")]
10601056
#[test]
10611057
fn to_and_from_box() {
10621058
let string = "abc".into_ascii_string().unwrap();

0 commit comments

Comments
 (0)