mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-14 00:00:13 +02:00
Remove Take/TakeMut
This commit is contained in:
+1
-13
@@ -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 {
|
||||
|
||||
@@ -16,5 +16,4 @@ pub use buf::{
|
||||
Reader,
|
||||
Writer,
|
||||
};
|
||||
pub use buf::take::{Take, TakeMut};
|
||||
pub use bytes::{Bytes, BytesMut};
|
||||
|
||||
Reference in New Issue
Block a user