net: Add features for pool size and remove unwrap on smoltcp device

This commit is contained in:
Thales Fragoso
2021-06-14 18:06:12 -03:00
committed by Dario Nieuwenhuis
parent 6cecc6d4b5
commit 3396a51938
3 changed files with 18 additions and 1 deletions

View File

@ -43,8 +43,8 @@ impl<'a> SmolDevice<'a> for DeviceAdapter {
type TxToken = TxToken<'a>;
fn receive(&'a mut self) -> Option<(Self::RxToken, Self::TxToken)> {
let tx_pkt = PacketBox::new(Packet::new())?;
let rx_pkt = self.device.receive()?;
let tx_pkt = PacketBox::new(Packet::new()).unwrap(); // TODO: not sure about unwrap
let rx_token = RxToken { pkt: rx_pkt };
let tx_token = TxToken {
device: self.device,