@@ -42,8 +42,8 @@ impl <M> Clone for Sender<M> where M: AsOutputSegments {
42
42
}
43
43
44
44
/// Creates a new WriteQueue that wraps the given writer.
45
- pub fn write_queue < W , M > ( mut writer : W ) -> ( Sender < M > , impl Future < Output =Result < ( ) , Error > > + ' static )
46
- where W : AsyncWrite + Unpin + ' static , M : AsOutputSegments + ' static
45
+ pub fn write_queue < W , M > ( mut writer : W ) -> ( Sender < M > , impl Future < Output =Result < ( ) , Error > > )
46
+ where W : AsyncWrite + Unpin , M : AsOutputSegments
47
47
{
48
48
let ( tx, mut rx) = futures:: channel:: mpsc:: unbounded ( ) ;
49
49
@@ -69,10 +69,10 @@ pub fn write_queue<W, M>(mut writer: W) -> (Sender<M>, impl Future<Output=Result
69
69
( sender, queue)
70
70
}
71
71
72
- impl < M > Sender < M > where M : AsOutputSegments + ' static {
72
+ impl < M > Sender < M > where M : AsOutputSegments {
73
73
/// Enqueues a message to be written. The returned future resolves once the write
74
74
/// has completed.
75
- pub fn send ( & mut self , message : M ) -> impl Future < Output =Result < M , Error > > + Unpin + ' static {
75
+ pub fn send ( & mut self , message : M ) -> impl Future < Output =Result < M , Error > > + Unpin {
76
76
let ( complete, oneshot) = oneshot:: channel ( ) ;
77
77
78
78
let _ = self . sender . unbounded_send ( Item :: Message ( message, complete) ) ;
@@ -89,7 +89,7 @@ impl <M> Sender<M> where M: AsOutputSegments + 'static {
89
89
/// Commands the queue to stop writing messages once it is empty. After this method has been called,
90
90
/// any new calls to `send()` will return a future that immediately resolves to an error.
91
91
/// If the passed-in `result` is an error, then the `WriteQueue` will resolve to that error.
92
- pub fn terminate ( & mut self , result : Result < ( ) , Error > ) -> impl Future < Output =Result < ( ) , Error > > + Unpin + ' static {
92
+ pub fn terminate ( & mut self , result : Result < ( ) , Error > ) -> impl Future < Output =Result < ( ) , Error > > + Unpin {
93
93
let ( complete, receiver) = oneshot:: channel ( ) ;
94
94
95
95
let _ = self . sender . unbounded_send ( Item :: Done ( result, complete) ) ;
0 commit comments