@@ -250,9 +250,9 @@ fn lint_branches_sharing_code<'tcx>(
250250 let cond_snippet = reindent_multiline ( & snippet ( cx, cond_span, "_" ) , false , None ) ;
251251 let cond_indent = indent_of ( cx, cond_span) ;
252252 let moved_snippet = reindent_multiline ( & snippet ( cx, span, "_" ) , true , None ) ;
253- let suggestion = moved_snippet. to_string ( ) + "\n " + & cond_snippet + "{" ;
253+ let suggestion = moved_snippet + "\n " + & cond_snippet + "{" ;
254254 let suggestion = reindent_multiline ( & suggestion, true , cond_indent) ;
255- ( replace_span, suggestion. to_string ( ) )
255+ ( replace_span, suggestion)
256256 } ) ;
257257 let end_suggestion = res. end_span ( last_block, sm) . map ( |span| {
258258 let moved_snipped = reindent_multiline ( & snippet ( cx, span, "_" ) , true , None ) ;
@@ -268,7 +268,7 @@ fn lint_branches_sharing_code<'tcx>(
268268 . then_some ( range. start - 4 ..range. end )
269269 } )
270270 . map_or ( span, |range| range. with_ctxt ( span. ctxt ( ) ) ) ;
271- ( span, suggestion. to_string ( ) )
271+ ( span, suggestion. clone ( ) )
272272 } ) ;
273273
274274 let ( span, msg, end_span) = match ( & start_suggestion, & end_suggestion) {
0 commit comments