Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Triton171 committed Mar 25, 2023
1 parent c0a79b3 commit c93883a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions helix-core/src/indent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ fn query_indents(
}
node_line
};
let get_node_line_num =
|node: Node| return get_line_num(node.start_position().row, node.start_byte());
let get_node_line_num = |node: Node| get_line_num(node.start_position().row, node.start_byte());
// Iterate over all captures from the query
for m in cursor.matches(query, syntax.tree().root_node(), RopeProvider(text)) {
// Skip matches where not all custom predicates are fulfilled
Expand Down Expand Up @@ -443,7 +442,7 @@ fn query_indents(
// The alignment will be updated to the correct value at the end, when the anchor is known.
"align" => IndentCaptureType::Align((0, 0)),
"anchor" => {
if let Some(_) = anchor {
if anchor.is_some() {
log::warn!("Invalid indent query: Encountered more than one @anchor in the same match.")
} else {
anchor = Some(capture.node);
Expand Down

0 comments on commit c93883a

Please sign in to comment.