@@ -34,37 +34,37 @@ mod strict_and_lenient_forms_tests {
3434 #[ rocket:: async_test]
3535 async fn test_strict_form ( ) {
3636 let client = client ( ) ;
37- let request = client. post ( "/strict" )
37+ let mut response = client. post ( "/strict" )
3838 . header ( ContentType :: Form )
39- . body ( format ! ( "field={}" , FIELD_VALUE ) ) ;
40- let mut response = request . dispatch ( ) . await ;
39+ . body ( format ! ( "field={}" , FIELD_VALUE ) )
40+ . dispatch ( ) . await ;
4141
4242 assert_eq ! ( response. status( ) , Status :: Ok ) ;
4343 assert_eq ! ( response. body_string( ) . await , Some ( FIELD_VALUE . into( ) ) ) ;
4444
45- let request = client. post ( "/strict" )
45+ let response = client. post ( "/strict" )
4646 . header ( ContentType :: Form )
47- . body ( format ! ( "field={}&extra=whoops" , FIELD_VALUE ) ) ;
48- let response = request . dispatch ( ) . await ;
47+ . body ( format ! ( "field={}&extra=whoops" , FIELD_VALUE ) )
48+ . dispatch ( ) . await ;
4949
5050 assert_eq ! ( response. status( ) , Status :: UnprocessableEntity ) ;
5151 }
5252
5353 #[ rocket:: async_test]
5454 async fn test_lenient_form ( ) {
5555 let client = client ( ) ;
56- let request = client. post ( "/lenient" )
56+ let mut response = client. post ( "/lenient" )
5757 . header ( ContentType :: Form )
58- . body ( format ! ( "field={}" , FIELD_VALUE ) ) ;
59- let mut response = request . dispatch ( ) . await ;
58+ . body ( format ! ( "field={}" , FIELD_VALUE ) )
59+ . dispatch ( ) . await ;
6060
6161 assert_eq ! ( response. status( ) , Status :: Ok ) ;
6262 assert_eq ! ( response. body_string( ) . await , Some ( FIELD_VALUE . into( ) ) ) ;
6363
64- let request = client. post ( "/lenient" )
64+ let mut response = client. post ( "/lenient" )
6565 . header ( ContentType :: Form )
66- . body ( format ! ( "field={}&extra=whoops" , FIELD_VALUE ) ) ;
67- let mut response = request . dispatch ( ) . await ;
66+ . body ( format ! ( "field={}&extra=whoops" , FIELD_VALUE ) )
67+ . dispatch ( ) . await ;
6868
6969 assert_eq ! ( response. status( ) , Status :: Ok ) ;
7070 assert_eq ! ( response. body_string( ) . await , Some ( FIELD_VALUE . into( ) ) ) ;
0 commit comments