diff --git a/src/lib.rs b/src/lib.rs index cf96db87..f799f3a6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,4 @@ #![cfg_attr(feature = "alloc", feature(alloc))] -#![cfg_attr(feature = "collections", feature(collections))] #![no_std] //! The _smoltcp_ library is built in a layered structure, with the layers corresponding @@ -77,9 +76,6 @@ extern crate std; extern crate libc; #[cfg(feature = "alloc")] extern crate alloc; -#[allow(deprecated)] -#[cfg(feature = "collections")] -extern crate collections; #[cfg(any(test, feature = "log"))] #[macro_use(log, log_enabled, trace, debug)] extern crate log; diff --git a/src/phy/loopback.rs b/src/phy/loopback.rs index d1ec834b..9ae0ea28 100644 --- a/src/phy/loopback.rs +++ b/src/phy/loopback.rs @@ -8,8 +8,8 @@ use alloc::rc::Rc; use std::vec::Vec; #[cfg(feature = "std")] use std::collections::VecDeque; -#[cfg(feature = "collections")] -use collections::{Vec, VecDeque}; +#[cfg(feature = "alloc")] +use alloc::{Vec, VecDeque}; use {Error, Result}; use super::{Device, DeviceLimits}; diff --git a/src/phy/mod.rs b/src/phy/mod.rs index 064c1451..7615f4d4 100644 --- a/src/phy/mod.rs +++ b/src/phy/mod.rs @@ -112,7 +112,7 @@ mod sys; mod tracer; mod fault_injector; mod pcap_writer; -#[cfg(any(feature = "std", feature = "collections"))] +#[cfg(any(feature = "std", feature = "alloc"))] mod loopback; #[cfg(feature = "raw_socket")] mod raw_socket; @@ -125,7 +125,7 @@ pub use self::sys::wait; pub use self::tracer::Tracer; pub use self::fault_injector::FaultInjector; pub use self::pcap_writer::{PcapLinkType, PcapMode, PcapSink, PcapWriter}; -#[cfg(any(feature = "std", feature = "collections"))] +#[cfg(any(feature = "std", feature = "alloc"))] pub use self::loopback::Loopback; #[cfg(any(feature = "raw_socket"))] pub use self::raw_socket::RawSocket; diff --git a/src/socket/set.rs b/src/socket/set.rs index ed59bdb5..0e01a900 100644 --- a/src/socket/set.rs +++ b/src/socket/set.rs @@ -61,7 +61,7 @@ impl<'a, 'b: 'a, 'c: 'a + 'b> Set<'a, 'b, 'c> { ManagedSlice::Borrowed(_) => { panic!("adding a socket to a full SocketSet") } - #[cfg(any(feature = "std", feature = "collections"))] + #[cfg(any(feature = "std", feature = "alloc"))] ManagedSlice::Owned(ref mut sockets) => { sockets.push(None); let index = sockets.len() - 1; diff --git a/src/storage/mod.rs b/src/storage/mod.rs index 6311f3bb..648a5136 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -2,7 +2,7 @@ //! //! The `storage` module provides containers for use in other modules. //! The containers support both pre-allocated memory, without the `std` -//! and `collections` crates being available, and heap-allocated memory. +//! or `alloc` crates being available, and heap-allocated memory. mod assembler; mod ring_buffer;