diff --git a/src/buf/mod.rs b/src/buf/mod.rs index e32f438b2f54c1048e1a1c098b89399fb1491556..cab96c50da05660f9896227dbad1812f21f730a0 100644 --- a/src/buf/mod.rs +++ b/src/buf/mod.rs @@ -1,6 +1,4 @@ -pub mod take; - -use {Bytes, Take, TakeMut}; +use {Bytes}; use byteorder::ByteOrder; use std::{cmp, io, ptr, usize}; @@ -173,11 +171,6 @@ pub trait Buf { self } - /// Create an adapter which will limit at most `limit` bytes from it. - fn take(self, limit: usize) -> Take<Self> where Self: Sized { - take::new(self, limit) - } - /// Return a `Reader` for the value. Allows using a `Buf` as an `io::Read` fn reader(self) -> Reader<Self> where Self: Sized { Reader::new(self) @@ -361,11 +354,6 @@ pub trait BufMut { self } - /// Create an adapter which will limit at most `limit` bytes from it. - fn take_mut(self, limit: usize) -> TakeMut<Self> where Self: Sized { - take::new_mut(self, limit) - } - /// Return a `Write` for the value. Allows using a `BufMut` as an /// `io::Write` fn writer(self) -> Writer<Self> where Self: Sized { diff --git a/src/lib.rs b/src/lib.rs index 156120319ae8ed3bf6b78d72e649fc8acc16a544..9d2a2e28fadb8ad21361ed2aeaa60a44f0163ccf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,5 +16,4 @@ pub use buf::{ Reader, Writer, }; -pub use buf::take::{Take, TakeMut}; pub use bytes::{Bytes, BytesMut};