Skip to content

Commit e7ca347

Browse files
GearsDatapackslpil
authored andcommitted
Clippy
1 parent c319a7b commit e7ca347

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

compiler-core/src/language_server/code_action.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ pub fn code_action_add_missing_patterns(
10521052
continue;
10531053
};
10541054

1055-
let indent_size = count_indentation(&module.code, &edits.line_numbers, range.start.line);
1055+
let indent_size = count_indentation(&module.code, edits.line_numbers, range.start.line);
10561056

10571057
let indent = " ".repeat(indent_size);
10581058

@@ -2839,11 +2839,8 @@ impl<'a> ExtractVariable<'a> {
28392839

28402840
let range = self.edits.src_span_to_lsp_range(insert_location);
28412841

2842-
let indent_size = count_indentation(
2843-
&self.module.code,
2844-
&self.edits.line_numbers,
2845-
range.start.line,
2846-
);
2842+
let indent_size =
2843+
count_indentation(&self.module.code, self.edits.line_numbers, range.start.line);
28472844

28482845
let mut indent = " ".repeat(indent_size);
28492846

@@ -3428,11 +3425,8 @@ impl<'a> ExtractConstant<'a> {
34283425
.edits
34293426
.src_span_to_lsp_range(self.selected_expression.expect("Real range value"));
34303427

3431-
let indent_size = count_indentation(
3432-
&self.module.code,
3433-
&self.edits.line_numbers,
3434-
range.start.line,
3435-
);
3428+
let indent_size =
3429+
count_indentation(&self.module.code, self.edits.line_numbers, range.start.line);
34363430

34373431
let expr_span_with_new_line = SrcSpan {
34383432
// We remove leading indentation + 1 to remove the newline with it
@@ -6391,11 +6385,8 @@ impl<'a> WrapInBlock<'a> {
63916385
.edits
63926386
.src_span_to_lsp_range(self.selected_expression.expect("Real range value"));
63936387

6394-
let indent_size = count_indentation(
6395-
&self.module.code,
6396-
&self.edits.line_numbers,
6397-
range.start.line,
6398-
);
6388+
let indent_size =
6389+
count_indentation(&self.module.code, self.edits.line_numbers, range.start.line);
63996390

64006391
let expr_indent_size = indent_size + 2;
64016392

0 commit comments

Comments
 (0)