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 a72b3b5 commit 3c14772Copy full SHA for 3c14772
src/c.rs
@@ -7,7 +7,7 @@
7
use std::ffi::CStr;
8
use std::os::raw::c_char;
9
10
-use super::null_error_check;
+use super::validate_pointer_is_not_null;
11
12
use crate::error::PointerError;
13
@@ -25,7 +25,7 @@ use crate::error::PointerError;
25
pub unsafe fn ref_str<'a>(string: *const c_char) -> Result<&'a str, PointerError> {
26
// ATTENTION! 'a lifetime is required, does NOT REMOVE it
27
// see commit 5a03be91d2da8909986db7c54650f3a7863a91ff fixing 3a1d15f33e8e418ef6bee2b7b9e096780bd2c8ac
28
- null_error_check(string)?;
+ validate_pointer_is_not_null(string)?;
29
// CAUTION: this is unsafe
30
let string = CStr::from_ptr(string);
31
return Ok(string.to_str()?);
0 commit comments