Fix code syle nits
- phy: Fix unused mut ref - wire: Fix comment collapse unneeded impl block Closes: #250 Approved by: whitequark
This commit is contained in:
parent
1745df2110
commit
56463f19bd
|
@ -95,7 +95,7 @@ impl phy::TxToken for TxToken {
|
|||
let mut lower = self.lower.borrow_mut();
|
||||
let mut buffer = vec![0; len];
|
||||
let result = f(&mut buffer);
|
||||
lower.send(&mut buffer[..]).unwrap();
|
||||
lower.send(&buffer[..]).unwrap();
|
||||
result
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ impl phy::TxToken for TxToken {
|
|||
let mut lower = self.lower.borrow_mut();
|
||||
let mut buffer = vec![0; len];
|
||||
let result = f(&mut buffer);
|
||||
lower.send(&mut buffer[..]).unwrap();
|
||||
lower.send(&buffer[..]).unwrap();
|
||||
result
|
||||
}
|
||||
}
|
||||
|
|
|
@ -307,9 +307,7 @@ impl<'a> Ipv6OptionsIterator<'a> {
|
|||
length, data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Ipv6OptionsIterator<'a> {
|
||||
/// Helper function to return an error in the implementation
|
||||
/// of `Iterator`.
|
||||
#[inline]
|
||||
|
@ -343,7 +341,8 @@ impl<'a> Iterator for Ipv6OptionsIterator<'a> {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// If we failed to parse an option we do
|
||||
// If we failed to parse a previous option or hit the end of the
|
||||
// buffer, we do not continue to iterate.
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue