Skip to content

Commit a8c0d1b

Browse files
committed
Fixed some lints.
Signed-off-by: Marvin Hansen <marvin.hansen@gmail.com>
1 parent 8b56503 commit a8c0d1b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

ultragraph/src/types/storage/graph_dynamic/graph_mut.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ impl<N, W> GraphMut<N, W> for DynamicGraph<N, W> {
1515
let index = self.nodes.len();
1616
self.nodes.push(Some(node));
1717

18-
if self.num_edges_per_node.is_some() {
19-
let edge_capacity = self.num_edges_per_node.unwrap();
18+
if let Some(edge_capacity) = self.num_edges_per_node {
2019
self.edges.push(Vec::with_capacity(edge_capacity)); // Add a corresponding edge list with edge_capacity
2120
} else {
2221
self.edges.push(Vec::default()); // Add a corresponding empty edge list

0 commit comments

Comments
 (0)