File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl Handler for Application {
51
51
);
52
52
53
53
// Create a Hyper Response and send it back to the middlewares chain
54
- Ok (Response :: builder () . body ( Body :: from (" ¡Hola!" )) . unwrap ( ))
54
+ Ok (Response :: new ( Body :: from (" ¡Hola!" )))
55
55
}
56
56
}
57
57
@@ -110,7 +110,7 @@ async fn main() -> Result {
110
110
handler . link_before (FirstMiddleware {});
111
111
handler . link_after (SecondMiddleware {});
112
112
113
- // 3. Create an Hyper service and set the current handler with its middlewares
113
+ // 3. Create a Hyper service and set the current handler with its middlewares
114
114
let service = Service :: new (handler );
115
115
116
116
// 4. Finally just run server using the service already created
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ impl Handler for Application {
34
34
) ;
35
35
36
36
// Create a Hyper Response and send it back to the middlewares chain
37
- Ok ( Response :: builder ( ) . body ( Body :: from ( "¡Hola!" ) ) . unwrap ( ) )
37
+ Ok ( Response :: new ( Body :: from ( "¡Hola!" ) ) )
38
38
}
39
39
}
40
40
@@ -93,7 +93,7 @@ async fn main() -> Result {
93
93
handler. link_before ( FirstMiddleware { } ) ;
94
94
handler. link_after ( SecondMiddleware { } ) ;
95
95
96
- // 3. Create an Hyper service and set the current handler with its middlewares
96
+ // 3. Create a Hyper service and set the current handler with its middlewares
97
97
let service = Service :: new ( handler) ;
98
98
99
99
// 4. Finally just run server using the service already created
You can’t perform that action at this time.
0 commit comments