@@ -8,7 +8,7 @@ use hyper;
8
8
9
9
struct OkResult ;
10
10
impl Handler for OkResult {
11
- fn call ( & self , _req : & mut Request ) -> Result < Response , Box < Error + Send > > {
11
+ fn call ( & self , _req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
12
12
Ok ( Response {
13
13
status : ( 200 , "OK" ) ,
14
14
headers : build_headers ( "value" ) ,
@@ -19,22 +19,22 @@ impl Handler for OkResult {
19
19
20
20
struct ErrorResult ;
21
21
impl Handler for ErrorResult {
22
- fn call ( & self , _req : & mut Request ) -> Result < Response , Box < Error + Send > > {
22
+ fn call ( & self , _req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
23
23
let error = :: std:: io:: Error :: last_os_error ( ) ;
24
24
Err ( Box :: new ( error) )
25
25
}
26
26
}
27
27
28
28
struct Panic ;
29
29
impl Handler for Panic {
30
- fn call ( & self , _req : & mut Request ) -> Result < Response , Box < Error + Send > > {
30
+ fn call ( & self , _req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
31
31
panic ! ( )
32
32
}
33
33
}
34
34
35
35
struct InvalidHeader ;
36
36
impl Handler for InvalidHeader {
37
- fn call ( & self , _req : & mut Request ) -> Result < Response , Box < Error + Send > > {
37
+ fn call ( & self , _req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
38
38
let mut headers = build_headers ( "discarded" ) ;
39
39
headers. insert ( "invalid" . into ( ) , vec ! [ "\r \n " . into( ) ] ) ;
40
40
Ok ( Response {
@@ -47,7 +47,7 @@ impl Handler for InvalidHeader {
47
47
48
48
struct InvalidStatus ;
49
49
impl Handler for InvalidStatus {
50
- fn call ( & self , _req : & mut Request ) -> Result < Response , Box < Error + Send > > {
50
+ fn call ( & self , _req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
51
51
Ok ( Response {
52
52
status : ( 1000 , "invalid status code" ) ,
53
53
headers : build_headers ( "discarded" ) ,
@@ -58,7 +58,7 @@ impl Handler for InvalidStatus {
58
58
59
59
struct AssertPathNormalized ;
60
60
impl Handler for AssertPathNormalized {
61
- fn call ( & self , req : & mut Request ) -> Result < Response , Box < Error + Send > > {
61
+ fn call ( & self , req : & mut dyn Request ) -> Result < Response , Box < dyn Error + Send > > {
62
62
if req. path ( ) == "/normalized" {
63
63
OkResult . call ( req)
64
64
} else {
0 commit comments