From fe7bbf4b9c002199ce92ad0c8e868698d85e7cc0 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sat, 23 Nov 2024 16:48:33 +0100 Subject: [PATCH] fix: use proper pattern binding --- src/directed/topological_sort.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directed/topological_sort.rs b/src/directed/topological_sort.rs index 761ae461..c3ae336a 100644 --- a/src/directed/topological_sort.rs +++ b/src/directed/topological_sort.rs @@ -180,7 +180,7 @@ where let mut groups = Vec::>::new(); let mut prev_group: Vec = preds_map .iter() - .filter(|(_, &num_preds)| num_preds == 0) + .filter(|&(_, num_preds)| *num_preds == 0) .map(|(node, _)| node.clone()) .collect(); if prev_group.is_empty() {