Skip to content

Commit 873709a

Browse files
committed
Fix compile errors
1 parent 7beaf0a commit 873709a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ascii_string.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ use alloc::borrow::{Borrow, BorrowMut, Cow, ToOwned};
22
use alloc::fmt;
33
use alloc::string::String;
44
use alloc::vec::Vec;
5+
use alloc::boxed::Box;
6+
use alloc::rc::Rc;
7+
use alloc::sync::Arc;
58
#[cfg(feature = "std")]
69
use core::any::Any;
710
use core::iter::FromIterator;
@@ -15,8 +18,6 @@ use std::ffi::{CStr, CString};
1518

1619
use ascii_char::AsciiChar;
1720
use ascii_str::{AsAsciiStr, AsAsciiStrError, AsciiStr};
18-
use std::rc::Rc;
19-
use std::sync::Arc;
2021

2122
/// A growable string stored as an ASCII encoded buffer.
2223
#[derive(Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -978,12 +979,11 @@ where
978979

979980
#[cfg(test)]
980981
mod tests {
981-
use super::AsciiString;
982-
#[cfg(feature = "std")]
983-
use super::IntoAsciiString;
982+
use super::{AsciiString, IntoAsciiString};
984983
use alloc::str::FromStr;
985984
use alloc::string::{String, ToString};
986985
use alloc::vec::Vec;
986+
use alloc::boxed::Box;
987987
#[cfg(feature = "std")]
988988
use std::ffi::CString;
989989
use {AsciiChar, AsciiStr};

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#![allow(unused_unsafe)]
5656

5757
#[cfg(feature = "alloc")]
58-
#[cfg_attr(test, macro_use)]
58+
#[macro_use]
5959
extern crate alloc;
6060
#[cfg(feature = "std")]
6161
extern crate core;

0 commit comments

Comments
 (0)