We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dccfdf9 commit 790c344Copy full SHA for 790c344
src/_macros.rs
@@ -20,7 +20,7 @@ macro_rules! panic_on_tskit_error {
20
($code: expr) => {
21
if $code < 0 {
22
let c_str = unsafe { std::ffi::CStr::from_ptr($crate::bindings::tsk_strerror($code)) };
23
- let str_slice: &str = c_str.to_str().unwrap();
+ let str_slice: &str = c_str.to_str().expect("failed to obtain &str from c_str");
24
let message: String = str_slice.to_owned();
25
panic!("{}", message);
26
}
0 commit comments