diff --git a/Cargo.toml b/Cargo.toml index dcef60b5..667afa8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ fdcan = { version = "0.2", optional = true } embedded-storage = "0.3" [dependencies.smoltcp] -version = "0.11.0" +version = "0.12.0" default-features = false features = ["medium-ethernet", "proto-ipv4", "socket-raw"] optional = true diff --git a/src/ethernet/eth.rs b/src/ethernet/eth.rs index b825595b..5177a3fd 100644 --- a/src/ethernet/eth.rs +++ b/src/ethernet/eth.rs @@ -816,7 +816,7 @@ pub struct RxToken<'a, const RD: usize>(&'a mut RDesRing); impl<'a, const RD: usize> phy::RxToken for RxToken<'a, RD> { fn consume(self, f: F) -> R where - F: FnOnce(&mut [u8]) -> R, + F: FnOnce(&[u8]) -> R, { let result = f(unsafe { self.0.buf_as_slice_mut() }); self.0.release();