@@ -165,14 +165,10 @@ mod channel_impls;
165165#[ cfg( feature = "alloc" ) ]
166166mod if_alloc {
167167 use super :: * ;
168+ use futures_core:: never:: Never ;
168169
169- /// The error type for `Vec` and `VecDequeue` when used as `Sink`s.
170- /// Values of this type can never be created.
171- #[ derive( Copy , Clone , Debug ) ]
172- pub enum VecSinkError { }
173-
174- impl < T > Sink < T > for :: alloc:: vec:: Vec < T > {
175- type SinkError = VecSinkError ;
170+ impl < T > Sink < T > for alloc:: vec:: Vec < T > {
171+ type SinkError = Never ;
176172
177173 fn poll_ready ( self : Pin < & mut Self > , _: & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: SinkError > > {
178174 Poll :: Ready ( Ok ( ( ) ) )
@@ -193,8 +189,8 @@ mod if_alloc {
193189 }
194190 }
195191
196- impl < T > Sink < T > for :: alloc:: collections:: VecDeque < T > {
197- type SinkError = VecSinkError ;
192+ impl < T > Sink < T > for alloc:: collections:: VecDeque < T > {
193+ type SinkError = Never ;
198194
199195 fn poll_ready ( self : Pin < & mut Self > , _: & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: SinkError > > {
200196 Poll :: Ready ( Ok ( ( ) ) )
@@ -215,7 +211,7 @@ mod if_alloc {
215211 }
216212 }
217213
218- impl < S : ?Sized + Sink < Item > + Unpin , Item > Sink < Item > for :: alloc:: boxed:: Box < S > {
214+ impl < S : ?Sized + Sink < Item > + Unpin , Item > Sink < Item > for alloc:: boxed:: Box < S > {
219215 type SinkError = S :: SinkError ;
220216
221217 fn poll_ready ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: SinkError > > {
@@ -235,6 +231,3 @@ mod if_alloc {
235231 }
236232 }
237233}
238-
239- #[ cfg( feature = "alloc" ) ]
240- pub use self :: if_alloc:: * ;
0 commit comments