@@ -17,16 +17,16 @@ pub trait VarIntWriter {
1717
1818/// Like VarIntWriter, but asynchronous.
1919#[ cfg( any( feature = "tokio_async" , feature = "futures_async" ) ) ]
20- #[ async_trait:: async_trait]
20+ #[ async_trait:: async_trait( ? Send ) ]
2121pub trait VarIntAsyncWriter {
2222 /// Write a VarInt integer to an asynchronous writer.
23- async fn write_varint_async < VI : VarInt + Send > ( & mut self , n : VI ) -> Result < usize > ;
23+ async fn write_varint_async < VI : VarInt > ( & mut self , n : VI ) -> Result < usize > ;
2424}
2525
2626#[ cfg( any( feature = "tokio_async" , feature = "futures_async" ) ) ]
27- #[ async_trait:: async_trait]
28- impl < AW : AsyncWrite + Send + Unpin > VarIntAsyncWriter for AW {
29- async fn write_varint_async < VI : VarInt + Send > ( & mut self , n : VI ) -> Result < usize > {
27+ #[ async_trait:: async_trait( ? Send ) ]
28+ impl < AW : AsyncWrite + Unpin > VarIntAsyncWriter for AW {
29+ async fn write_varint_async < VI : VarInt > ( & mut self , n : VI ) -> Result < usize > {
3030 let mut buf = [ 0 as u8 ; 10 ] ;
3131 let b = n. encode_var ( & mut buf) ;
3232 self . write_all ( & buf[ 0 ..b] ) . await ?;
@@ -50,15 +50,15 @@ pub trait FixedIntWriter {
5050}
5151
5252#[ cfg( any( feature = "tokio_async" , feature = "futures_async" ) ) ]
53- #[ async_trait:: async_trait]
53+ #[ async_trait:: async_trait( ? Send ) ]
5454pub trait FixedIntAsyncWriter {
55- async fn write_fixedint_async < FI : FixedInt + Send > ( & mut self , n : FI ) -> Result < usize > ;
55+ async fn write_fixedint_async < FI : FixedInt > ( & mut self , n : FI ) -> Result < usize > ;
5656}
5757
5858#[ cfg( any( feature = "tokio_async" , feature = "futures_async" ) ) ]
59- #[ async_trait:: async_trait]
60- impl < AW : AsyncWrite + Unpin + Send > FixedIntAsyncWriter for AW {
61- async fn write_fixedint_async < FI : FixedInt + Send > ( & mut self , n : FI ) -> Result < usize > {
59+ #[ async_trait:: async_trait( ? Send ) ]
60+ impl < AW : AsyncWrite + Unpin > FixedIntAsyncWriter for AW {
61+ async fn write_fixedint_async < FI : FixedInt > ( & mut self , n : FI ) -> Result < usize > {
6262 let mut buf = [ 0 as u8 ; 8 ] ;
6363 n. encode_fixed ( & mut buf[ ..std:: mem:: size_of :: < FI > ( ) ] ) ;
6464 self . write_all ( & buf[ ..std:: mem:: size_of :: < FI > ( ) ] ) . await ?;
0 commit comments