We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05f5d38 commit 74a5129Copy full SHA for 74a5129
src/error.rs
@@ -91,7 +91,10 @@ pub fn panic_on_tskit_error(code: i32) {
91
/// if the system runs out of memory.
92
pub fn get_tskit_error_message(code: i32) -> String {
93
let c_str = unsafe { std::ffi::CStr::from_ptr(crate::bindings::tsk_strerror(code)) };
94
- c_str.to_str().unwrap().to_owned()
+ c_str
95
+ .to_str()
96
+ .expect("failed to convert c_str to &str")
97
+ .to_owned()
98
}
99
100
/// Given an instance of [``TskReturnValue``](crate::TskReturnValue),
0 commit comments