@@ -3,10 +3,6 @@ use futures_core::task::{Context, Poll};
3
3
use futures_sink:: Sink ;
4
4
use core:: fmt;
5
5
use core:: pin:: Pin ;
6
- #[ cfg( feature = "std" ) ]
7
- use std:: any:: Any ;
8
- #[ cfg( feature = "std" ) ]
9
- use std:: error:: Error ;
10
6
11
7
use crate :: lock:: BiLock ;
12
8
@@ -47,12 +43,12 @@ fn SplitSink<S: Sink<Item>, Item>(lock: BiLock<S>) -> SplitSink<S, Item> {
47
43
/// A `Sink` part of the split pair
48
44
#[ derive( Debug ) ]
49
45
#[ must_use = "sinks do nothing unless polled" ]
50
- pub struct SplitSink < S : Sink < Item > , Item > {
46
+ pub struct SplitSink < S , Item > {
51
47
lock : BiLock < S > ,
52
48
slot : Option < Item > ,
53
49
}
54
50
55
- impl < S : Sink < Item > , Item > Unpin for SplitSink < S , Item > { }
51
+ impl < S , Item > Unpin for SplitSink < S , Item > { }
56
52
57
53
impl < S : Sink < Item > + Unpin , Item > SplitSink < S , Item > {
58
54
/// Attempts to put the two "halves" of a split `Stream + Sink` back
@@ -112,21 +108,21 @@ pub(super) fn split<S: Stream + Sink<Item>, Item>(s: S) -> (SplitSink<S, Item>,
112
108
113
109
/// Error indicating a `SplitSink<S>` and `SplitStream<S>` were not two halves
114
110
/// of a `Stream + Split`, and thus could not be `reunite`d.
115
- pub struct ReuniteError < T : Sink < Item > , Item > ( pub SplitSink < T , Item > , pub SplitStream < T > ) ;
111
+ pub struct ReuniteError < T , Item > ( pub SplitSink < T , Item > , pub SplitStream < T > ) ;
116
112
117
- impl < T : Sink < Item > , Item > fmt:: Debug for ReuniteError < T , Item > {
113
+ impl < T , Item > fmt:: Debug for ReuniteError < T , Item > {
118
114
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
119
115
f. debug_tuple ( "ReuniteError" )
120
116
. field ( & "..." )
121
117
. finish ( )
122
118
}
123
119
}
124
120
125
- impl < T : Sink < Item > , Item > fmt:: Display for ReuniteError < T , Item > {
121
+ impl < T , Item > fmt:: Display for ReuniteError < T , Item > {
126
122
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
127
123
write ! ( f, "tried to reunite a SplitStream and SplitSink that don't form a pair" )
128
124
}
129
125
}
130
126
131
127
#[ cfg( feature = "std" ) ]
132
- impl < T : Any + Sink < Item > , Item > Error for ReuniteError < T , Item > { }
128
+ impl < T : core :: any :: Any , Item > std :: error :: Error for ReuniteError < T , Item > { }
0 commit comments