Thank you clippy, very cool

This commit is contained in:
Maveth 2022-01-13 12:31:51 -06:00
parent 167c9b2113
commit c8f083aa44

View File

@ -12,9 +12,7 @@ fn check_cyclic_skill_deps() {
let mut graph = UnGraph::new_undirected();
let mut nodes = HashMap::<Skill, _>::new();
let mut add_node = |graph: &mut UnGraph<Skill, _>, node: Skill| {
*nodes
.entry(node.clone())
.or_insert_with(|| graph.add_node(node.clone()))
*nodes.entry(node).or_insert_with(|| graph.add_node(node))
};
for (skill, prereqs) in skill_prereqs.iter() {