diff --git a/src/buf/mod.rs b/src/buf/mod.rs index e32f438..cab96c5 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 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 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 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 where Self: Sized { diff --git a/src/lib.rs b/src/lib.rs index 1561203..9d2a2e2 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};