Skip to content

Commit 027f255

Browse files
authored
Merge pull request #496 from gz/patch-1
Update loopback.rs
2 parents 68b3fb4 + 95f7abf commit 027f255

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ compile_error!("at least one socket needs to be enabled"); */
8888
#![allow(clippy::option_map_unit_fn)]
8989
#![allow(clippy::unit_arg)]
9090

91-
#[cfg(feature = "alloc")]
91+
#[cfg(any(feature = "std", feature = "alloc"))]
9292
extern crate alloc;
9393

9494
#[cfg(not(any(feature = "proto-ipv4", feature = "proto-ipv6")))]

src/phy/loopback.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
#[cfg(feature = "std")]
2-
use std::vec::Vec;
3-
#[cfg(feature = "std")]
4-
use std::collections::VecDeque;
5-
#[cfg(feature = "alloc")]
61
use alloc::vec::Vec;
7-
#[cfg(all(feature = "alloc", not(feature = "rust-1_28")))]
2+
#[cfg(not(feature = "rust-1_28"))]
83
use alloc::collections::VecDeque;
9-
#[cfg(all(feature = "alloc", feature = "rust-1_28"))]
4+
#[cfg(feature = "rust-1_28")]
105
use alloc::VecDeque;
116

127
use crate::Result;

0 commit comments

Comments
 (0)