Merge pull request #463 from smoltcp-rs/faultinjector-fix

phy: fix FaultInjector returning a too big buffer
This commit is contained in:
Dario Nieuwenhuis 2021-04-07 02:48:27 +02:00 committed by GitHub
commit f2231c1cb5
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ impl<'a, Tx: phy::TxToken> phy::TxToken for TxToken<'a, Tx> {
};
if drop {
return f(&mut self.junk);
return f(&mut self.junk[..len]);
}
let Self { token, state, config, .. } = self;