mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
Fix clippy collapsible_if warning in topo_sort
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
afaffa2538
commit
cf05084f7c
1 changed files with 8 additions and 8 deletions
|
|
@ -408,14 +408,14 @@ fn topo_sort(
|
|||
for dep in dep_refs {
|
||||
let dep_dir = dir_name_from_id(dep);
|
||||
for candidate in feature_ids {
|
||||
if candidate == dep || dir_name_from_id(candidate) == dep_dir {
|
||||
if id_set.contains(candidate.as_str()) {
|
||||
// candidate -> id (candidate must come before id)
|
||||
let edge = (candidate.as_str(), id.as_str());
|
||||
if edge_set.insert(edge) {
|
||||
edges.entry(candidate.as_str()).or_default().push(id.as_str());
|
||||
*in_degree.entry(id.as_str()).or_insert(0) += 1;
|
||||
}
|
||||
if (candidate == dep || dir_name_from_id(candidate) == dep_dir)
|
||||
&& id_set.contains(candidate.as_str())
|
||||
{
|
||||
// candidate -> id (candidate must come before id)
|
||||
let edge = (candidate.as_str(), id.as_str());
|
||||
if edge_set.insert(edge) {
|
||||
edges.entry(candidate.as_str()).or_default().push(id.as_str());
|
||||
*in_degree.entry(id.as_str()).or_insert(0) += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue