Explicitly say that the assist removes *redundant* parentheses

This commit is contained in:
Maybe Waffle 2022-12-08 18:22:57 +00:00
parent ab061945a1
commit 2870b01ec0

View file

@ -4,7 +4,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists};
// Assist: remove_parentheses // Assist: remove_parentheses
// //
// Removes useless parentheses. // Removes redundant parentheses.
// //
// ``` // ```
// fn main() { // fn main() {
@ -51,7 +51,7 @@ pub(crate) fn remove_parentheses(acc: &mut Assists, ctx: &AssistContext<'_>) ->
let target = parens.syntax().text_range(); let target = parens.syntax().text_range();
acc.add( acc.add(
AssistId("remove_parentheses", AssistKind::Refactor), AssistId("remove_parentheses", AssistKind::Refactor),
"Remove parentheses", "Remove redundant parentheses",
target, target,
|builder| { |builder| {
builder.delete(TextRange::new(delete_from_l, delete_to_l)); builder.delete(TextRange::new(delete_from_l, delete_to_l));