From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- crates/ide_assists/src/handlers/convert_comment_block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide_assists/src/handlers/convert_comment_block.rs') diff --git a/crates/ide_assists/src/handlers/convert_comment_block.rs b/crates/ide_assists/src/handlers/convert_comment_block.rs index d202a85f9..749e8685b 100644 --- a/crates/ide_assists/src/handlers/convert_comment_block.rs +++ b/crates/ide_assists/src/handlers/convert_comment_block.rs @@ -88,7 +88,7 @@ fn line_to_block(acc: &mut Assists, comment: ast::Comment) -> Option<()> { // We pick a single indentation level for the whole block comment based on the // comment where the assist was invoked. This will be prepended to the // contents of each line comment when they're put into the block comment. - let indentation = IndentLevel::from_token(&comment.syntax()); + let indentation = IndentLevel::from_token(comment.syntax()); let block_comment_body = comments.into_iter().map(|c| line_comment_text(indentation, c)).join("\n"); @@ -167,7 +167,7 @@ fn line_comment_text(indentation: IndentLevel, comm: ast::Comment) -> String { if contents.is_empty() { contents.to_owned() } else { - indentation.to_string() + &contents + indentation.to_string() + contents } } -- cgit v1.2.3