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> {
1015
1015
self . inner . now = timestamp;
1016
1016
1017
1017
#[ cfg( feature = "proto-ipv4-fragmentation" ) ]
1018
- if let Err ( e) = self
1019
- . fragments
1018
+ self . fragments
1020
1019
. 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 ( ) ?) ) ?;
1025
1021
1026
1022
#[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
1027
- if let Err ( e) = self
1028
- . fragments
1023
+ self . fragments
1029
1024
. 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 ( ) ?) ) ?;
1034
1026
1035
1027
#[ cfg( feature = "proto-ipv4-fragmentation" ) ]
1036
1028
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> {
364
364
let mut buf = & self . buffer . as_ref ( ) [ field:: OPTIONS ] ;
365
365
iter:: from_fn ( move || {
366
366
loop {
367
- match buf. get ( 0 ) . copied ( ) {
367
+ match buf. first ( ) . copied ( ) {
368
368
// No more options, return.
369
369
None => return None ,
370
370
Some ( field:: OPT_END ) => return None ,
You can’t perform that action at this time.
0 commit comments