File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ where
100
100
101
101
async fn from_request ( req : Request , state : & S ) -> Result < Self , Self :: Rejection > {
102
102
let ( mut parts, body) = req. into_parts ( ) ;
103
- let Ok ( accept) = Accept :: from_request_parts ( & mut parts, state) . await ;
103
+ let accept = Accept :: from_request_parts ( & mut parts, state) . await . unwrap ( ) ;
104
104
105
105
let req = Request :: from_parts ( parts, body) ;
106
106
Original file line number Diff line number Diff line change @@ -139,7 +139,9 @@ where
139
139
Box :: pin ( async move {
140
140
let ( mut parts, ..) = req. into_parts ( ) ;
141
141
142
- let Ok ( content_type) = Accept :: from_request_parts ( & mut parts, & state) . await ;
142
+ let content_type = Accept :: from_request_parts ( & mut parts, & state)
143
+ . await
144
+ . unwrap ( ) ;
143
145
144
146
self ( ) . await . into_codec_response ( content_type. into ( ) )
145
147
} )
@@ -166,7 +168,7 @@ macro_rules! impl_handler {
166
168
Box :: pin( async move {
167
169
let ( mut parts, body) = req. into_parts( ) ;
168
170
169
- let Ok ( content_type) = Accept :: from_request_parts( & mut parts, & state) . await ;
171
+ let content_type = Accept :: from_request_parts( & mut parts, & state) . await . unwrap ( ) ;
170
172
171
173
$(
172
174
let $ty = match $ty:: from_request_parts( & mut parts, & state) . await {
You can’t perform that action at this time.
0 commit comments