chore: fix clippy warnings and run rustfmt

This commit is contained in:
Riz Ashraf committed 2026-10-09 00:39:50 +01:00
1 parent fecd8bf33f
commit 3765e6b05d
21 files changed
+420 -369

No files matched your search

+20 -16
View File
@@ -63,16 +63,17 @@ impl<'a> GraphQueryBuilder<'a> {
}
nodes_at_current_depth -= 1;
if current_depth < self.max_depth
&& let Some(neighbors) = adj.get(current) {
for &(neighbor, rel_type, is_inverse) in neighbors {
if !visited.contains(neighbor) {
visited.insert(neighbor);
parents.insert(neighbor, (current, rel_type, is_inverse));
queue.push_back(neighbor);
nodes_at_next_depth += 1;
}
&& let Some(neighbors) = adj.get(current)
{
for &(neighbor, rel_type, is_inverse) in neighbors {
if !visited.contains(neighbor) {
visited.insert(neighbor);
parents.insert(neighbor, (current, rel_type, is_inverse));
queue.push_back(neighbor);
nodes_at_next_depth += 1;
}
}
}
if nodes_at_current_depth == 0 {
current_depth += 1;
nodes_at_current_depth = nodes_at_next_depth;
@@ -997,13 +998,14 @@ impl McpTool for GetSubgraphHandler {
while let Some((curr, d)) = queue.pop_front() {
if d < depth
&& let Some(neighbors) = adj.get(curr) {
for &next in neighbors {
if visited.insert(next.to_string()) {
queue.push_back((next, d + 1));
}
&& let Some(neighbors) = adj.get(curr)
{
for &next in neighbors {
if visited.insert(next.to_string()) {
queue.push_back((next, d + 1));
}
}
}
}
let ent: std::collections::HashMap<String, crate::models::Entity> = visited
@@ -1176,9 +1178,11 @@ impl McpTool for ResolveStaleSymbolsHandler {
state.modify_graph(|g| {
for name in g.entities.keys() {
if let Some(target) = &req.target
&& name != target && !name.contains(target) {
continue;
}
&& name != target
&& !name.contains(target)
{
continue;
}
checked += 1;
let path = std::path::Path::new(name);
if (name.contains('/') || name.contains('\\') || name.contains('.'))