Update src/runtime/dependency_graph.rs

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Niko Matsakis 2021-11-13 16:28:59 -05:00 committed by GitHub
parent 563334da17
commit cd265bfd12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,8 +152,7 @@ impl DependencyGraph {
if let Some(cycle) = edge.stack[prefix..]
.iter()
.rev()
.filter_map(|aq| aq.cycle.clone())
.next()
.find_map(|aq| aq.cycle.clone())
{
// Remove `id` from the list of runtimes blocked on `next_key`:
self.query_dependents