Skip to content

Commit

Permalink
Use or_default() in test
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Sep 22, 2023
1 parent 4ef79e5 commit 49c917d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/r299.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 49c917d

Please sign in to comment.