Silence warning about is_empty method

These were flagged by `cargo clippy`:

    warning: item has a public `len` method but no corresponding
             `is_empty` method
This commit is contained in:
Alex Crawford 2020-12-27 11:13:40 -08:00
parent 1a1861721b
commit 79e81bf97f
2 changed files with 2 additions and 0 deletions

View File

@ -712,6 +712,7 @@ pub enum Control {
Rst
}
#[allow(clippy::len_without_is_empty)]
impl Control {
/// Return the length of a control flag, in terms of sequence space.
pub fn len(self) -> usize {

View File

@ -27,6 +27,7 @@ mod field {
}
}
#[allow(clippy::len_without_is_empty)]
impl<T: AsRef<[u8]>> Packet<T> {
/// Imbue a raw octet buffer with UDP packet structure.
pub fn new_unchecked(buffer: T) -> Packet<T> {