summaryrefslogtreecommitdiffstats
path: root/tokio/src/stream/collect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/stream/collect.rs')
-rw-r--r--tokio/src/stream/collect.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/tokio/src/stream/collect.rs b/tokio/src/stream/collect.rs
index 3f91a6f2..1aafc303 100644
--- a/tokio/src/stream/collect.rs
+++ b/tokio/src/stream/collect.rs
@@ -1,6 +1,5 @@
use crate::stream::Stream;
-use bytes::{Buf, BufMut, Bytes, BytesMut};
use core::future::Future;
use core::marker::PhantomPinned;
use core::mem;
@@ -205,44 +204,6 @@ where
}
}
-impl<T: Buf> FromStream<T> for Bytes {}
-
-impl<T: Buf> sealed::FromStreamPriv<T> for Bytes {
- type InternalCollection = BytesMut;
-
- fn initialize(_: sealed::Internal, _lower: usize, _upper: Option<usize>) -> BytesMut {
- BytesMut::new()
- }
-
- fn extend(_: sealed::Internal, collection: &mut BytesMut, item: T) -> bool {
- collection.put(item);
- true
- }
-
- fn finalize(_: sealed::Internal, collection: &mut BytesMut) -> Bytes {
- mem::replace(collection, BytesMut::new()).freeze()
- }
-}
-
-impl<T: Buf> FromStream<T> for BytesMut {}
-
-impl<T: Buf> sealed::FromStreamPriv<T> for BytesMut {
- type InternalCollection = BytesMut;
-
- fn initialize(_: sealed::Internal, _lower: usize, _upper: Option<usize>) -> BytesMut {
- BytesMut::new()
- }
-
- fn extend(_: sealed::Internal, collection: &mut BytesMut, item: T) -> bool {
- collection.put(item);
- true
- }
-
- fn finalize(_: sealed::Internal, collection: &mut BytesMut) -> BytesMut {
- mem::replace(collection, BytesMut::new())
- }
-}
-
pub(crate) mod sealed {
#[doc(hidden)]
pub trait FromStreamPriv<T> {