Skip to content

Commit db51a3a

Browse files
committed
fix: Add changes needed in commit of mode validation to submodule (human error)
1 parent dd37995 commit db51a3a

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/lib.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,7 @@ use error::PointerError;
2727
#[cfg(all(feature = "std", feature = "lender"))]
2828
mod lender;
2929

30-
#[inline]
31-
fn validate_pointer_is_not_null<T>(pointer: *const T) -> Result<(), PointerError> {
32-
if pointer.is_null() {
33-
log::error!("Using a NULL pointer as an opaque pointer to Rust's data");
34-
return Err(PointerError::Null);
35-
}
36-
return Ok(());
37-
}
38-
39-
#[inline]
40-
fn validate_pointer<T>(pointer: *const T) -> Result<(), PointerError> {
41-
validate_pointer_is_not_null(pointer)?;
42-
#[cfg(all(feature = "std", feature = "lender"))]
43-
if !lender::is_lent(pointer) {
44-
log::error!("Using an invalid pointer as an opaque pointer to Rust's data");
45-
return Err(PointerError::Invalid);
46-
}
47-
return Ok(());
48-
}
30+
mod validation;
4931

5032
/// Get a heap-allocated raw pointer without ownership.
5133
///

0 commit comments

Comments
 (0)