mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-12 19:56:48 +00:00
chore: break out of loop when level is empty
This commit is contained in:
1 parent
5ff6d71e7c
commit
be5ff91eb3
1 file changed
+5
@@ -99,6 +99,10 @@ impl Service {
|
||||
.await;
|
||||
seen.extend(level.iter().copied());
|
||||
for _ in 0..max_depth {
|
||||
if level.is_empty() {
|
||||
break;
|
||||
}
|
||||
|
||||
let next: Vec<Vec<_>> = level
|
||||
.iter()
|
||||
.copied()
|
||||
@@ -110,6 +114,7 @@ impl Service {
|
||||
})
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
counts.append(&mut level);
|
||||
level = next
|
||||
.into_iter()
|
||||
|
||||
Reference in new issue
Block a user