File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 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 {
5151 );
5252
5353 // 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!" )))
5555 }
5656}
5757
@@ -110,7 +110,7 @@ async fn main() -> Result {
110110 handler . link_before (FirstMiddleware {});
111111 handler . link_after (SecondMiddleware {});
112112
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
114114 let service = Service :: new (handler );
115115
116116 // 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 {
3434 ) ;
3535
3636 // 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!" ) ) )
3838 }
3939}
4040
@@ -93,7 +93,7 @@ async fn main() -> Result {
9393 handler. link_before ( FirstMiddleware { } ) ;
9494 handler. link_after ( SecondMiddleware { } ) ;
9595
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
9797 let service = Service :: new ( handler) ;
9898
9999 // 4. Finally just run server using the service already created
You can’t perform that action at this time.
0 commit comments