Remove Take/TakeMut

This commit is contained in:
Carl Lerche
2017-02-16 10:36:00 -08:00
parent 0e0066e8a0
commit bababa8797
2 changed files with 1 additions and 14 deletions
+1 -13
View File
@@ -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 {
-1
View File
@@ -16,5 +16,4 @@ pub use buf::{
Reader,
Writer,
};
pub use buf::take::{Take, TakeMut};
pub use bytes::{Bytes, BytesMut};