mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-18 20:16:42 +00:00
Bump smoltcp to newest git version
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7db9ae23a3
commit
bb4751741a
@ -37,12 +37,12 @@ pub struct RxToken(RxBuffer);
|
||||
impl phy::RxToken for RxToken {
|
||||
fn consume<R, F>(self, f: F) -> R
|
||||
where
|
||||
F: FnOnce(&mut [u8]) -> R,
|
||||
F: FnOnce(&[u8]) -> R,
|
||||
{
|
||||
let mut packet = self.0.packet();
|
||||
let mut buffer = vec![0u8; packet.remain()];
|
||||
packet.read(&mut VmWriter::from(&mut buffer as &mut [u8]));
|
||||
f(&mut buffer)
|
||||
f(&buffer)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user