Merge pull request #5116 from simon04/patch-1

tsort: use Iterator.all
This commit is contained in:
Daniel Hofstetter 2023-07-29 07:50:38 +02:00 committed by GitHub
commit 5c65f44957
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())
}
}