Skip to content

Commit

Permalink
Use .expect() with message about failure over .unwrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez committed Mar 6, 2024
1 parent 51bc123 commit 8755772
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net-utils/src/ip_echo_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub fn ip_echo_server(
.thread_name("solIpEchoSrvrRt")
.enable_all()
.build()
.unwrap();
.expect("new tokio runtime");
runtime.spawn(run_echo_server(tcp_listener, shred_version));
runtime
}
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ impl Bank {
ThreadPoolBuilder::new()
.thread_name(|i| format!("solBnkNewEpch{i:02}"))
.build()
.unwrap(),
.expect("new rayon threadpool"),
"thread_pool_creation",
);

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ impl SnapshotStorageRebuilder {
.thread_name(|i| format!("solRbuildSnap{i:02}"))
.num_threads(self.num_threads)
.build()
.unwrap()
.expect("new rayon threadpool")
}
}

Expand Down

0 comments on commit 8755772

Please sign in to comment.