File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed
Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use pin_project_lite::pin_project;
55use std:: {
66 future:: Future ,
77 pin:: Pin ,
8- task:: { ready , Context , Poll } ,
8+ task:: { Context , Poll } ,
99} ;
1010use tokio:: sync:: OwnedSemaphorePermit ;
1111
3535 type Output = Result < T , E > ;
3636
3737 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
38- Poll :: Ready ( ready ! ( self . project( ) . inner. poll( cx) ) )
38+ self . project ( ) . inner . poll ( cx)
3939 }
4040}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use super::Rate;
22use std:: {
33 future:: Future ,
44 pin:: Pin ,
5- task:: { ready , Context , Poll } ,
5+ task:: { Context , Poll } ,
66} ;
77use tokio:: time:: { Instant , Sleep } ;
88use tower_service:: Service ;
7070
7171 fn poll_ready ( & mut self , cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
7272 match self . state {
73- State :: Ready { .. } => return Poll :: Ready ( ready ! ( self . inner. poll_ready( cx) ) ) ,
73+ State :: Ready { .. } => return self . inner . poll_ready ( cx) ,
7474 State :: Limited => {
7575 if Pin :: new ( & mut self . sleep ) . poll ( cx) . is_pending ( ) {
7676 tracing:: trace!( "rate limit exceeded; sleeping." ) ;
8484 rem : self . rate . num ( ) ,
8585 } ;
8686
87- Poll :: Ready ( ready ! ( self . inner. poll_ready( cx) ) )
87+ self . inner . poll_ready ( cx)
8888 }
8989
9090 fn call ( & mut self , request : Request ) -> Self :: Future {
Original file line number Diff line number Diff line change 33use std:: fmt;
44use std:: future:: Future ;
55use std:: pin:: Pin ;
6- use std:: task:: { ready , Context , Poll } ;
6+ use std:: task:: { Context , Poll } ;
77
88use pin_project_lite:: pin_project;
99
5353
5454 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
5555 match self . project ( ) . state . project ( ) {
56- ResponseStateProj :: Called { fut } => {
57- Poll :: Ready ( ready ! ( fut. poll( cx) ) . map_err ( Into :: into) )
58- }
56+ ResponseStateProj :: Called { fut } => fut. poll ( cx) . map_err ( Into :: into) ,
5957 ResponseStateProj :: Overloaded => Poll :: Ready ( Err ( Overloaded :: new ( ) . into ( ) ) ) ,
6058 }
6159 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use pin_project_lite::pin_project;
33use std:: {
44 future:: Future ,
55 pin:: Pin ,
6- task:: { ready , Context , Poll } ,
6+ task:: { Context , Poll } ,
77} ;
88
99pin_project ! {
3232
3333 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
3434 match self . project ( ) . inner . as_pin_mut ( ) {
35- Some ( inner) => Poll :: Ready ( Ok ( ready ! ( inner. poll( cx) ) . map_err ( Into :: into) ? ) ) ,
35+ Some ( inner) => inner. poll ( cx) . map_err ( Into :: into) ,
3636 None => Poll :: Ready ( Err ( error:: None :: new ( ) . into ( ) ) ) ,
3737 }
3838 }
You can’t perform that action at this time.
0 commit comments