- let snippet = snippet_block_with_applicability(ctx, check.span, "..", None, &mut applicability);
-
- let invert = if inverted { "!" } else { "" };
- let need_parens = should_have_parentheses(check);
-
- let snippet_with_braces = {
- let (left_paren, right_paren) = if need_parens {("(", ")")} else {("", "")};
- format!("{invert}{left_paren}{snippet}{right_paren}")
+ let snippet = {
+ let mut sugg = Sugg::hir_with_applicability(ctx, check, "..", &mut applicability);
+ if inverted {
+ sugg = !sugg;
+ }
+ sugg