aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/indent.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-02-09 22:27:08 +0000
committerGitHub2023-02-09 22:27:08 +0000
commit8a3ec443f176218384db8c8610bbada9c43a6ea5 (patch)
tree5b8ada854a35d6afd530a33943bfacef338d84f8 /helix-core/src/indent.rs
parent9d73a0d1128f8237eef2d4bf475496d4db081df2 (diff)
Fix new clippy lints (#5892)
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r--helix-core/src/indent.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index d6aa5edb..3aa59fa3 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -604,7 +604,7 @@ pub fn treesitter_indent_for_pos(
&mut cursor,
text,
query_range,
- new_line.then(|| (line, byte_pos)),
+ new_line.then_some((line, byte_pos)),
);
ts_parser.cursors.push(cursor);
(query_result, deepest_preceding)
@@ -624,7 +624,7 @@ pub fn treesitter_indent_for_pos(
tab_width,
);
}
- let mut first_in_line = get_first_in_line(node, new_line.then(|| byte_pos));
+ let mut first_in_line = get_first_in_line(node, new_line.then_some(byte_pos));
let mut result = Indentation::default();
// We always keep track of all the indent changes on one line, in order to only indent once