Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/py_asabr_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl PyAsabrRouter {
match contact_plan {
Ok((nodes, contacts)) => {
let nodes_id_map = make_nodes_id_map(&nodes);
let router = build_generic_router::<NoManagement, SegmentationManager>(
let Ok(router) = build_generic_router::<NoManagement, SegmentationManager>(
router_type,
nodes,
contacts,
Expand All @@ -49,7 +49,9 @@ impl PyAsabrRouter {
check_size: true,
max_entries: 10,
}),
);
) else {
panic!("build_generic_router failed.");
};

Ok(Self {
nodes_id_map,
Expand All @@ -72,7 +74,7 @@ impl PyAsabrRouter {
) -> Vec<(PyAsabrContact, Vec<NodeID>)> {
let bundle = bundle.to_native_bundle();

if let Some(routing_output) = self
if let Ok(Some(routing_output)) = self
.router
.route(source, &bundle, curr_time, &excluded_nodes)
{
Expand Down