File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
#![ deny( warnings) ]
2
+ #![ deny( rust_2018_idioms) ]
2
3
3
4
#[ cfg( all( target_env = "musl" , target_pointer_width = "64" ) ) ]
4
5
#[ global_allocator]
5
6
static ALLOC : jemallocator:: Jemalloc = jemallocator:: Jemalloc ;
6
7
7
- extern crate static_web_server;
8
-
9
- use self :: static_web_server:: { Result , Server } ;
8
+ use static_web_server:: { Result , Server } ;
10
9
11
10
fn main ( ) -> Result {
12
11
Server :: new ( ) . run ( ) ?;
Original file line number Diff line number Diff line change 1
1
#![ deny( warnings) ]
2
+ #![ deny( rust_2018_idioms) ]
2
3
3
4
#[ macro_use]
4
5
extern crate anyhow;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl<T> Service<T> for RouterService {
26
26
type Error = Infallible ;
27
27
type Future = Ready < Result < Self :: Response , Self :: Error > > ;
28
28
29
- fn poll_ready ( & mut self , _: & mut Context ) -> Poll < Result < ( ) , Self :: Error > > {
29
+ fn poll_ready ( & mut self , _: & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
30
30
Poll :: Ready ( Ok ( ( ) ) )
31
31
}
32
32
@@ -45,7 +45,7 @@ impl Service<Request<Body>> for RequestService {
45
45
type Error = Error ;
46
46
type Future = Pin < Box < dyn Future < Output = Result < Response < Body > , Error > > + Send + ' static > > ;
47
47
48
- fn poll_ready ( & mut self , _: & mut Context ) -> Poll < Result < ( ) , Error > > {
48
+ fn poll_ready ( & mut self , _: & mut Context < ' _ > ) -> Poll < Result < ( ) , Error > > {
49
49
Poll :: Ready ( Ok ( ( ) ) )
50
50
}
51
51
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub struct TlsConfigBuilder {
71
71
}
72
72
73
73
impl std:: fmt:: Debug for TlsConfigBuilder {
74
- fn fmt ( & self , f : & mut :: std:: fmt:: Formatter ) -> :: std:: fmt:: Result {
74
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> :: std:: fmt:: Result {
75
75
f. debug_struct ( "TlsConfigBuilder" ) . finish ( )
76
76
}
77
77
}
@@ -303,8 +303,8 @@ impl TlsStream {
303
303
impl AsyncRead for TlsStream {
304
304
fn poll_read (
305
305
self : Pin < & mut Self > ,
306
- cx : & mut Context ,
307
- buf : & mut ReadBuf ,
306
+ cx : & mut Context < ' _ > ,
307
+ buf : & mut ReadBuf < ' _ > ,
308
308
) -> Poll < io:: Result < ( ) > > {
309
309
let pin = self . get_mut ( ) ;
310
310
match pin. state {
You can’t perform that action at this time.
0 commit comments