Skip to content
Snippets Groups Projects
Commit bababa87 authored by Carl Lerche's avatar Carl Lerche
Browse files

Remove Take/TakeMut

parent 0e0066e8
No related branches found
No related tags found
No related merge requests found
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 {
......
......@@ -16,5 +16,4 @@ pub use buf::{
Reader,
Writer,
};
pub use buf::take::{Take, TakeMut};
pub use bytes::{Bytes, BytesMut};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment