File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -188,20 +188,18 @@ impl Http1Transaction for Server {
188188 headers_len = req. headers . len ( ) ;
189189 }
190190 Ok ( httparse:: Status :: Partial ) => return Ok ( None ) ,
191- Err ( err) => {
192- return Err ( match err {
193- // if invalid Token, try to determine if for method or path
194- httparse:: Error :: Token => {
195- if req. method . is_none ( ) {
196- Parse :: Method
197- } else {
198- debug_assert ! ( req. path. is_none( ) ) ;
199- Parse :: Uri
200- }
191+ // if invalid Token, try to determine if for method or path
192+ Err ( httparse:: Error :: Token ) => {
193+ return Err ( {
194+ if req. method . is_none ( ) {
195+ Parse :: Method
196+ } else {
197+ debug_assert ! ( req. path. is_none( ) ) ;
198+ Parse :: Uri
201199 }
202- other => other. into ( ) ,
203- } ) ;
200+ } )
204201 }
202+ Err ( err) => return Err ( err. into ( ) ) ,
205203 }
206204 } ;
207205
You can’t perform that action at this time.
0 commit comments