Skip to content

Commit

Permalink
Correctly format .expect message
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Jun 12, 2024
1 parent 78a8d75 commit db9ef40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osm4routing/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Reader {
let node = self
.nodes
.get_mut(node_id)
.expect("Missing node, id: {node_id}");
.unwrap_or_else(|| panic!("Missing node, id: {}", node_id.0));
// Count double extremities nodes to be sure to include dead-ends
if i == 0 || i == way.nodes.len() - 1 {
node.uses += 2;
Expand Down

0 comments on commit db9ef40

Please sign in to comment.