mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-27 00:00:17 +02:00
Remove Take/TakeMut
This commit is contained in:
+1
-13
@@ -1,6 +1,4 @@
|
|||||||
pub mod take;
|
use {Bytes};
|
||||||
|
|
||||||
use {Bytes, Take, TakeMut};
|
|
||||||
use byteorder::ByteOrder;
|
use byteorder::ByteOrder;
|
||||||
use std::{cmp, io, ptr, usize};
|
use std::{cmp, io, ptr, usize};
|
||||||
|
|
||||||
@@ -173,11 +171,6 @@ pub trait Buf {
|
|||||||
self
|
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`
|
/// Return a `Reader` for the value. Allows using a `Buf` as an `io::Read`
|
||||||
fn reader(self) -> Reader<Self> where Self: Sized {
|
fn reader(self) -> Reader<Self> where Self: Sized {
|
||||||
Reader::new(self)
|
Reader::new(self)
|
||||||
@@ -361,11 +354,6 @@ pub trait BufMut {
|
|||||||
self
|
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
|
/// Return a `Write` for the value. Allows using a `BufMut` as an
|
||||||
/// `io::Write`
|
/// `io::Write`
|
||||||
fn writer(self) -> Writer<Self> where Self: Sized {
|
fn writer(self) -> Writer<Self> where Self: Sized {
|
||||||
|
|||||||
@@ -16,5 +16,4 @@ pub use buf::{
|
|||||||
Reader,
|
Reader,
|
||||||
Writer,
|
Writer,
|
||||||
};
|
};
|
||||||
pub use buf::take::{Take, TakeMut};
|
|
||||||
pub use bytes::{Bytes, BytesMut};
|
pub use bytes::{Bytes, BytesMut};
|
||||||
|
|||||||
Reference in New Issue
Block a user