@@ -52,7 +52,7 @@ async fn param_example(
5252 return Ok ( Response :: builder ( )
5353 . status ( StatusCode :: UNPROCESSABLE_ENTITY )
5454 . body ( full ( MISSING ) )
55- . unwrap ( ) ) ;
55+ . expect ( "constant status won't error" ) ) ;
5656 } ;
5757 let number = if let Some ( n) = params. get ( "number" ) {
5858 if let Ok ( v) = n. parse :: < f64 > ( ) {
@@ -61,13 +61,13 @@ async fn param_example(
6161 return Ok ( Response :: builder ( )
6262 . status ( StatusCode :: UNPROCESSABLE_ENTITY )
6363 . body ( full ( NOTNUMERIC ) )
64- . unwrap ( ) ) ;
64+ . expect ( "constant status won't error" ) ) ;
6565 }
6666 } else {
6767 return Ok ( Response :: builder ( )
6868 . status ( StatusCode :: UNPROCESSABLE_ENTITY )
6969 . body ( full ( MISSING ) )
70- . unwrap ( ) ) ;
70+ . expect ( "constant status won't error" ) ) ;
7171 } ;
7272
7373 // Render the response. This will often involve
@@ -86,7 +86,7 @@ async fn param_example(
8686 return Ok ( Response :: builder ( )
8787 . status ( StatusCode :: UNPROCESSABLE_ENTITY )
8888 . body ( full ( MISSING ) )
89- . unwrap ( ) ) ;
89+ . expect ( "constant status won't error" ) ) ;
9090 } ;
9191 let params = form_urlencoded:: parse ( query. as_bytes ( ) )
9292 . into_owned ( )
@@ -97,15 +97,15 @@ async fn param_example(
9797 return Ok ( Response :: builder ( )
9898 . status ( StatusCode :: UNPROCESSABLE_ENTITY )
9999 . body ( full ( MISSING ) )
100- . unwrap ( ) ) ;
100+ . expect ( "constant status won't error" ) ) ;
101101 } ;
102102 let body = format ! ( "You requested {}" , page) ;
103103 Ok ( Response :: new ( full ( body) ) )
104104 }
105105 _ => Ok ( Response :: builder ( )
106106 . status ( StatusCode :: NOT_FOUND )
107107 . body ( empty ( ) )
108- . unwrap ( ) ) ,
108+ . expect ( "constant status won't error" ) ) ,
109109 }
110110}
111111
0 commit comments