From ca1146995f1ea67350272c662a83885cc95aa4eb Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 26 Jan 2017 21:20:48 +0000 Subject: [PATCH] Remove TcpControl::len(). --- src/wire/tcp.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/wire/tcp.rs b/src/wire/tcp.rs index 7f340a5..58bd03f 100644 --- a/src/wire/tcp.rs +++ b/src/wire/tcp.rs @@ -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)] pub struct Packet> { buffer: T @@ -459,18 +459,6 @@ pub enum Control { 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. #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct Repr<'a> {