File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 22
33use std:: { borrow:: Cow , iter} ;
44
5- use itertools:: { MultiPeek , multipeek} ;
5+ use itertools:: { Itertools as _ , MultiPeek , multipeek} ;
66use rustc_span:: Span ;
77use tracing:: { debug, trace} ;
88
@@ -1056,8 +1056,7 @@ fn light_rewrite_comment(
10561056 config : & Config ,
10571057 is_doc_comment : bool ,
10581058) -> String {
1059- let lines: Vec < & str > = orig
1060- . lines ( )
1059+ orig. lines ( )
10611060 . map ( |l| {
10621061 // This is basically just l.trim(), but in the case that a line starts
10631062 // with `*` we want to leave one space before it, so it aligns with the
@@ -1075,8 +1074,7 @@ fn light_rewrite_comment(
10751074 // Preserve markdown's double-space line break syntax in doc comment.
10761075 trim_end_unless_two_whitespaces ( left_trimmed, is_doc_comment)
10771076 } )
1078- . collect ( ) ;
1079- lines. join ( & format ! ( "\n {}" , offset. to_string( config) ) )
1077+ . join ( & format ! ( "\n {}" , offset. to_string( config) ) )
10801078}
10811079
10821080/// Trims comment characters and possibly a single space from the left of a string.
You can’t perform that action at this time.
0 commit comments