Browse Source

Remove TcpControl::len().

whitequark 8 years ago
parent
commit
cd880aff2d
1 changed files with 1 additions and 13 deletions
  1. 1 13
      src/wire/tcp.rs

+ 1 - 13
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<T: AsRef<[u8]>> {
     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> {