File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -1015,22 +1015,14 @@ impl<'a> Interface<'a> {
10151015 self . inner . now = timestamp;
10161016
10171017 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
1018- if let Err ( e) = self
1019- . fragments
1018+ self . fragments
10201019 . ipv4_fragments
1021- . remove_when ( |frag| Ok ( timestamp >= frag. expires_at ( ) ?) )
1022- {
1023- return Err ( e) ;
1024- }
1020+ . remove_when ( |frag| Ok ( timestamp >= frag. expires_at ( ) ?) ) ?;
10251021
10261022 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
1027- if let Err ( e) = self
1028- . fragments
1023+ self . fragments
10291024 . sixlowpan_fragments
1030- . remove_when ( |frag| Ok ( timestamp >= frag. expires_at ( ) ?) )
1031- {
1032- return Err ( e) ;
1033- }
1025+ . remove_when ( |frag| Ok ( timestamp >= frag. expires_at ( ) ?) ) ?;
10341026
10351027 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
10361028 match self . ipv4_egress ( device) {
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ impl<T: AsRef<[u8]>> Packet<T> {
364364 let mut buf = & self . buffer . as_ref ( ) [ field:: OPTIONS ] ;
365365 iter:: from_fn ( move || {
366366 loop {
367- match buf. get ( 0 ) . copied ( ) {
367+ match buf. first ( ) . copied ( ) {
368368 // No more options, return.
369369 None => return None ,
370370 Some ( field:: OPT_END ) => return None ,
You can’t perform that action at this time.
0 commit comments