From 01f30577c1a25a3c2eb2bdc6a1ebf4a23a8d0e70 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 29 Nov 2019 18:54:09 -0700 Subject: [PATCH] Update smoltcp --- Cargo.toml | 7 ++++++- smoltcp | 2 +- src/smolnetd/device.rs | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f8b92891e8..a6f751c46c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,12 @@ features = ["release_max_level_warn"] [dependencies.smoltcp] path = "smoltcp" default-features = false -features = ["std", "socket-raw", "proto-ipv4", "socket-udp", "socket-tcp", "socket-icmp"] +features = [ + "std", + "ethernet", + "proto-ipv4", + "socket-raw", "socket-icmp", "socket-udp", "socket-tcp" +] #For debugging: "log", "verbose" [profile.release] diff --git a/smoltcp b/smoltcp index 30793fc901..9eae8d296b 160000 --- a/smoltcp +++ b/smoltcp @@ -1 +1 @@ -Subproject commit 30793fc901dc3a836e3177cc2b1e782389748fd5 +Subproject commit 9eae8d296b96f95c352ec0df14d899df4790f780 diff --git a/src/smolnetd/device.rs b/src/smolnetd/device.rs index dbb6eefe4d..9385a6c93a 100644 --- a/src/smolnetd/device.rs +++ b/src/smolnetd/device.rs @@ -45,11 +45,11 @@ pub struct RxToken { } impl smoltcp::phy::RxToken for RxToken { - fn consume(self, _timestamp: Instant, f: F) -> smoltcp::Result + fn consume(mut self, _timestamp: Instant, f: F) -> smoltcp::Result where - F: FnOnce(&[u8]) -> smoltcp::Result, + F: FnOnce(&mut [u8]) -> smoltcp::Result, { - f(&self.buffer) + f(&mut self.buffer) } }