@@ -371,9 +371,9 @@ impl EarlyLintPass for Write {
371
371
/// Return this and a boolean indicating whether it only consisted of a newline.
372
372
fn newline_span ( fmtstr : & StrLit ) -> ( Span , bool ) {
373
373
let sp = fmtstr. span ;
374
- let contents = & fmtstr. symbol . as_str ( ) ;
374
+ let contents = fmtstr. symbol . as_str ( ) ;
375
375
376
- if * contents == r"\n" {
376
+ if contents == r"\n" {
377
377
return ( sp, true ) ;
378
378
}
379
379
@@ -484,7 +484,7 @@ impl Write {
484
484
StrStyle :: Raw ( n) => Some ( n as usize ) ,
485
485
} ;
486
486
487
- let mut parser = Parser :: new ( & str_sym, style, snippet_opt ( cx, str_lit. span ) , false , ParseMode :: Format ) ;
487
+ let mut parser = Parser :: new ( str_sym, style, snippet_opt ( cx, str_lit. span ) , false , ParseMode :: Format ) ;
488
488
let mut args = SimpleFormatArgs :: default ( ) ;
489
489
490
490
while let Some ( arg) = parser. next ( ) {
@@ -589,7 +589,7 @@ impl Write {
589
589
lit. token . symbol . as_str ( ) . replace ( '{' , "{{" ) . replace ( '}' , "}}" )
590
590
} ,
591
591
LitKind :: StrRaw ( _) | LitKind :: Str | LitKind :: ByteStrRaw ( _) | LitKind :: ByteStr => continue ,
592
- LitKind :: Byte | LitKind :: Char => match & * lit. token . symbol . as_str ( ) {
592
+ LitKind :: Byte | LitKind :: Char => match lit. token . symbol . as_str ( ) {
593
593
"\" " if matches ! ( fmtstr. style, StrStyle :: Cooked ) => "\\ \" " ,
594
594
"\" " if matches ! ( fmtstr. style, StrStyle :: Raw ( 0 ) ) => continue ,
595
595
"\\ \\ " if matches ! ( fmtstr. style, StrStyle :: Raw ( _) ) => "\\ " ,
@@ -671,7 +671,7 @@ fn check_newlines(fmtstr: &StrLit) -> bool {
671
671
let mut last_was_cr = false ;
672
672
let mut should_lint = false ;
673
673
674
- let contents = & fmtstr. symbol . as_str ( ) ;
674
+ let contents = fmtstr. symbol . as_str ( ) ;
675
675
676
676
let mut cb = |r : Range < usize > , c : Result < char , EscapeError > | {
677
677
let c = c. unwrap ( ) ;
0 commit comments