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.
to_str
to_owned
1 parent 103681e commit 9ac2200Copy full SHA for 9ac2200
src/device/mod.rs
@@ -76,7 +76,7 @@ pub fn info_string(verbose: bool) -> String {
76
let err_val = af_info_string(&mut tmp, verbose);
77
HANDLE_ERROR(AfError::from(err_val));
78
79
- let result = CString::from_raw(tmp).into_string().unwrap();
+ let result = (*CString::from_raw(tmp)).to_str().unwrap().to_owned();
80
81
let err_val = af_free_host(tmp as *mut c_void);
82
0 commit comments