1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tsort: use Iterator.all

This commit is contained in:
Simon Legner 2023-07-28 21:25:11 +02:00 committed by GitHub
parent b24f91c4d6
commit 24319791ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,11 +171,6 @@ impl Graph {
}
fn is_acyclic(&self) -> bool {
for edges in self.out_edges.values() {
if !edges.is_empty() {
return false;
}
}
true
self.out_edges.values().all(|edge| edge.is_empty())
}
}