summaryrefslogtreecommitdiff
path: root/embassy-net/src/packet_pool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-net/src/packet_pool.rs')
-rw-r--r--embassy-net/src/packet_pool.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/embassy-net/src/packet_pool.rs b/embassy-net/src/packet_pool.rs
index 24635643..2c27d401 100644
--- a/embassy-net/src/packet_pool.rs
+++ b/embassy-net/src/packet_pool.rs
@@ -1,7 +1,7 @@
use as_slice::{AsMutSlice, AsSlice};
use core::ops::{Deref, DerefMut, Range};
-use super::pool::{BitPool, Box, StaticPool};
+use atomic_pool::{pool, Box};
pub const MTU: usize = 1514;
pub const PACKET_POOL_SIZE: usize = 4;
@@ -17,8 +17,12 @@ impl Packet {
}
}
-impl Box<PacketPool> {
- pub fn slice(self, range: Range<usize>) -> PacketBuf {
+pub trait PacketBoxExt {
+ fn slice(self, range: Range<usize>) -> PacketBuf;
+}
+
+impl PacketBoxExt for PacketBox {
+ fn slice(self, range: Range<usize>) -> PacketBuf {
PacketBuf {
packet: self,
range,