Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Commit c450bf5

Browse files
fix: fix clippy errors in flow and language crates
Fixed an unused variable warning in `crates/language/src/lib.rs` and collapsed an if-let statement in `crates/flow/src/incremental/analyzer.rs` as mandated by clippy. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
1 parent 2a726a1 commit c450bf5

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

crates/flow/src/incremental/analyzer.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -471,21 +471,21 @@ impl IncrementalAnalyzer {
471471
}
472472

473473
// Save edges to storage in batch
474-
if !edges_to_save.is_empty() {
475-
if let Err(e) = self.storage.save_edges_batch(&edges_to_save).await {
476-
warn!(
477-
error = %e,
478-
"batch save failed, falling back to individual saves"
479-
);
480-
for edge in &edges_to_save {
481-
if let Err(e) = self.storage.save_edge(edge).await {
482-
warn!(
483-
file_from = ?edge.from,
484-
file_to = ?edge.to,
485-
error = %e,
486-
"failed to save edge individually"
487-
);
488-
}
474+
if !edges_to_save.is_empty()
475+
&& let Err(e) = self.storage.save_edges_batch(&edges_to_save).await
476+
{
477+
warn!(
478+
error = %e,
479+
"batch save failed, falling back to individual saves"
480+
);
481+
for edge in &edges_to_save {
482+
if let Err(e) = self.storage.save_edge(edge).await {
483+
warn!(
484+
file_from = ?edge.from,
485+
file_to = ?edge.to,
486+
error = %e,
487+
"failed to save edge individually"
488+
);
489489
}
490490
}
491491
}

crates/language/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,9 @@ pub fn from_extension(path: &Path) -> Option<SupportLang> {
17351735
return Some(*lang);
17361736
}
17371737
}
1738+
1739+
// Silence unused variable warning if bash and ruby and all-parsers are not enabled
1740+
let _ = file_name;
17381741
}
17391742

17401743
// 3. Try shebang check as last resort

0 commit comments

Comments
 (0)