File tree 2 files changed +4
-9
lines changed
2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -916,12 +916,7 @@ mod embedded_svc_compat {
916
916
let headers = connection. headers ( ) . ok ( ) ;
917
917
918
918
if let Some ( headers) = headers {
919
- if headers. path . map ( |path| self . path == path) . unwrap_or ( false )
920
- && headers
921
- . method
922
- . map ( |method| self . method == method. into ( ) )
923
- . unwrap_or ( false )
924
- {
919
+ if headers. path == self . path && headers. method == self . method . into ( ) {
925
920
return self . handler . handle ( connection) . await ;
926
921
}
927
922
}
Original file line number Diff line number Diff line change @@ -1377,11 +1377,11 @@ mod embedded_svc_compat {
1377
1377
1378
1378
impl < ' b , const N : usize > embedded_svc:: http:: Query for super :: RequestHeaders < ' b , N > {
1379
1379
fn uri ( & self ) -> & ' _ str {
1380
- self . path . unwrap_or ( "" )
1380
+ self . path
1381
1381
}
1382
1382
1383
1383
fn method ( & self ) -> Method {
1384
- self . method . unwrap_or ( super :: Method :: Get ) . into ( )
1384
+ self . method . into ( )
1385
1385
}
1386
1386
}
1387
1387
@@ -1393,7 +1393,7 @@ mod embedded_svc_compat {
1393
1393
1394
1394
impl < ' b , const N : usize > embedded_svc:: http:: Status for super :: ResponseHeaders < ' b , N > {
1395
1395
fn status ( & self ) -> u16 {
1396
- self . code . unwrap_or ( 200 )
1396
+ self . code
1397
1397
}
1398
1398
1399
1399
fn status_message ( & self ) -> Option < & ' _ str > {
You can’t perform that action at this time.
0 commit comments