@@ -330,10 +330,7 @@ impl<'a> Parser<'a> {
330330 }
331331
332332 fn printable ( & mut self ) -> io:: Result < & ' a str > {
333- self . take_while ( |c| match c {
334- '\x21' ..='\x2b' | '\x2d' ..='\x7e' => true ,
335- _ => false ,
336- } )
333+ self . take_while ( |c| matches ! ( c, '\x21' ..='\x2b' | '\x2d' ..='\x7e' ) )
337334 }
338335
339336 fn nonce ( & mut self ) -> io:: Result < & ' a str > {
@@ -343,10 +340,7 @@ impl<'a> Parser<'a> {
343340 }
344341
345342 fn base64 ( & mut self ) -> io:: Result < & ' a str > {
346- self . take_while ( |c| match c {
347- 'a' ..='z' | 'A' ..='Z' | '0' ..='9' | '/' | '+' | '=' => true ,
348- _ => false ,
349- } )
343+ self . take_while ( |c| matches ! ( c, 'a' ..='z' | 'A' ..='Z' | '0' ..='9' | '/' | '+' | '=' ) )
350344 }
351345
352346 fn salt ( & mut self ) -> io:: Result < & ' a str > {
@@ -356,10 +350,7 @@ impl<'a> Parser<'a> {
356350 }
357351
358352 fn posit_number ( & mut self ) -> io:: Result < u32 > {
359- let n = self . take_while ( |c| match c {
360- '0' ..='9' => true ,
361- _ => false ,
362- } ) ?;
353+ let n = self . take_while ( |c| matches ! ( c, '0' ..='9' ) ) ?;
363354 n. parse ( )
364355 . map_err ( |e| io:: Error :: new ( io:: ErrorKind :: InvalidInput , e) )
365356 }
@@ -396,10 +387,7 @@ impl<'a> Parser<'a> {
396387 }
397388
398389 fn value ( & mut self ) -> io:: Result < & ' a str > {
399- self . take_while ( |c| match c {
400- '\0' | '=' | ',' => false ,
401- _ => true ,
402- } )
390+ self . take_while ( |c| matches ! ( c, '\0' | '=' | ',' ) )
403391 }
404392
405393 fn server_error ( & mut self ) -> io:: Result < Option < & ' a str > > {
0 commit comments