From cca3cf7827a93538945ec1947c416e65cd40bd4e Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Mon, 24 May 2021 12:15:14 +0200 Subject: [PATCH] Fix unintentional exponential order ids --- src/graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph.rs b/src/graph.rs index 759f874..aea1839 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -49,7 +49,7 @@ where let order = *self.ord.entry(n).or_insert_with(|| { let order = *next_ord; - *next_ord += next_ord.checked_add(1).expect("Topological order overflow"); + *next_ord = next_ord.checked_add(1).expect("Topological order overflow"); order });