fix(clippy): resolve lints for Rust 1.96 (io_other_error, derivable_impls, manual_contains, unnecessary_sort_by, while_let_loop)
CI / cargo fmt --check (push) Successful in 23s
CI / cargo clippy (push) Successful in 32s
CI / cargo test (push) Successful in 44s

This commit is contained in:
gffranco
2026-06-24 01:01:51 +00:00
parent 96970405a0
commit 22a6bcb815
13 changed files with 25 additions and 46 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ impl SyntaxRegistry {
pub fn detect_from_extension(&self, ext: &str) -> Option<&dyn SyntaxPlugin> {
self.plugins
.iter()
.find(|p| p.file_extensions().iter().any(|e| *e == ext))
.find(|p| p.file_extensions().contains(&ext))
.map(|p| p.as_ref())
}
@@ -547,8 +547,7 @@ impl<'a> ParseState<'a> {
// Text). We accept either as a continuation when the implied
// indent is `> level`.
let continuation_threshold = level + 1;
loop {
let Some(first) = self.peek() else { break };
while let Some(first) = self.peek() {
let mut consume_first = false;
let is_continuation = match &first.kind {
K::Text(s) => leading_ws_count(s) >= continuation_threshold,
@@ -561,7 +560,7 @@ impl<'a> ParseState<'a> {
consume_first = true;
true
} else {
false
break;
}
}
_ => false,