Remove TcpControl::len().

This commit is contained in:
whitequark 2017-01-26 21:20:48 +00:00
parent a3c997f007
commit ca1146995f
1 changed files with 1 additions and 13 deletions

View File

@ -60,7 +60,7 @@ impl cmp::PartialOrd for SeqNumber {
} }
} }
/// A read/write wrapper around an Transmission Control Protocol packet buffer. /// A read/write wrapper around a Transmission Control Protocol packet buffer.
#[derive(Debug)] #[derive(Debug)]
pub struct Packet<T: AsRef<[u8]>> { pub struct Packet<T: AsRef<[u8]>> {
buffer: T buffer: T
@ -459,18 +459,6 @@ pub enum Control {
Rst Rst
} }
impl Control {
/// Return the length of the control flag, in terms of sequence space.
pub fn len(self) -> i32 {
match self {
Control::None => 0,
Control::Syn => 1,
Control::Fin => 1,
Control::Rst => 0
}
}
}
/// A high-level representation of a Transmission Control Protocol packet. /// A high-level representation of a Transmission Control Protocol packet.
#[derive(Debug, PartialEq, Eq, Clone, Copy)] #[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub struct Repr<'a> { pub struct Repr<'a> {