From 49c917d2c5f2ecabcdd39c815c8fc9566b1eaf8c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 22 Sep 2023 15:21:47 +0200 Subject: [PATCH] Use or_default() in test --- tests/r299.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/r299.rs b/tests/r299.rs index 39e3e3cc..a646ffce 100644 --- a/tests/r299.rs +++ b/tests/r299.rs @@ -17,7 +17,7 @@ fn add_successor( to: &Point, cost: usize, ) { - let entry = n.entry(from.clone()).or_insert_with(Vec::new); + let entry = n.entry(from.clone()).or_default(); entry.push((to.clone(), cost)); }