Skip to content

Commit

Permalink
Fix clippy notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Dec 12, 2024
1 parent dc70b48 commit f90e017
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/lsp/src/handlers_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub(crate) fn document_range_formatting(
// We use the "non-whitespace-range" as that corresponds to what Biome will format.
let format_range = logical_lines
.iter()
.map(|line| text_non_whitespace_range(line))
.map(text_non_whitespace_range)
.reduce(|acc, new| acc.cover(new))
.expect("`logical_lines` is non-empty");

Expand All @@ -83,7 +83,7 @@ pub(crate) fn document_range_formatting(
// Since we only format logical lines, it is fine to wrap in an expression list.
let Some(exprs): Option<Vec<air_r_syntax::AnyRExpression>> = logical_lines
.into_iter()
.map(|node| air_r_syntax::AnyRExpression::cast(node))
.map(air_r_syntax::AnyRExpression::cast)
.collect()
else {
tracing::warn!("Can't cast to `AnyRExpression`");
Expand Down Expand Up @@ -160,7 +160,7 @@ fn find_deepest_enclosing_logical_lines(node: RSyntaxNode, range: TextRange) ->
// program's expression list. As soon as the lists diverge we stop.
let Some(list) = start_lists
.into_iter()
.zip(end_lists.into_iter())
.zip(end_lists)
.take_while(|pair| pair.0 == pair.1)
.map(|pair| pair.0)
.last()
Expand Down

0 comments on commit f90e017

Please sign in to comment.