File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ needless_pass_by_value = "allow"
127127pattern_type_mismatch = " allow"
128128redundant_else = " allow"
129129struct_excessive_bools = " allow" # TODO: bogus lint?
130- unnested_or_patterns = " allow"
131130unused_async = " allow" # TODO: is it for API?
132131unused_trait_names = " allow" # TODO: kinda annoying, but might be good to deny
133132unwrap_in_result = " allow"
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl DecodedLength {
6868 ) ) ]
6969 pub ( crate ) fn sub_if ( & mut self , amt : u64 ) {
7070 match self {
71- & mut DecodedLength :: CHUNKED | & mut DecodedLength :: CLOSE_DELIMITED => ( ) ,
71+ & mut ( DecodedLength :: CHUNKED | DecodedLength :: CLOSE_DELIMITED ) => ( ) ,
7272 DecodedLength ( known) => {
7373 * known -= amt;
7474 }
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ impl Error {
193193 pub fn is_parse_too_large ( & self ) -> bool {
194194 matches ! (
195195 self . inner. kind,
196- Kind :: Parse ( Parse :: TooLarge ) | Kind :: Parse ( Parse :: UriTooLong )
196+ Kind :: Parse ( Parse :: TooLarge | Parse :: UriTooLong )
197197 )
198198 }
199199
Original file line number Diff line number Diff line change @@ -493,10 +493,9 @@ impl Http1Transaction for Server {
493493 fn on_error ( err : & crate :: Error ) -> Option < MessageHead < Self :: Outgoing > > {
494494 use crate :: error:: Kind ;
495495 let status = match * err. kind ( ) {
496- Kind :: Parse ( Parse :: Method )
497- | Kind :: Parse ( Parse :: Header ( _) )
498- | Kind :: Parse ( Parse :: Uri )
499- | Kind :: Parse ( Parse :: Version ) => StatusCode :: BAD_REQUEST ,
496+ Kind :: Parse ( Parse :: Method | Parse :: Header ( _) | Parse :: Uri | Parse :: Version ) => {
497+ StatusCode :: BAD_REQUEST
498+ }
500499 Kind :: Parse ( Parse :: TooLarge ) => StatusCode :: REQUEST_HEADER_FIELDS_TOO_LARGE ,
501500 Kind :: Parse ( Parse :: UriTooLong ) => StatusCode :: URI_TOO_LONG ,
502501 _ => return None ,
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ impl Read for H2Upgraded {
179179 }
180180 Some ( Err ( e) ) => {
181181 return Poll :: Ready ( match e. reason ( ) {
182- Some ( Reason :: NO_ERROR ) | Some ( Reason :: CANCEL ) => Ok ( ( ) ) ,
182+ Some ( Reason :: NO_ERROR | Reason :: CANCEL ) => Ok ( ( ) ) ,
183183 Some ( Reason :: STREAM_CLOSED ) => {
184184 Err ( std:: io:: Error :: new ( std:: io:: ErrorKind :: BrokenPipe , e) )
185185 }
You can’t perform that action at this time.
0 commit comments