Mercurial > crates > nonstick
diff libpam-sys/src/helpers.rs @ 127:c77846f3a979
GET CTEST WORKING.
This will verify that the functions we're exporting are correct.
It has been a nightmare.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 30 Jun 2025 22:56:26 -0400 |
parents | 2b255c92417b |
children |
line wrap: on
line diff
--- a/libpam-sys/src/helpers.rs Mon Jun 30 21:52:10 2025 -0400 +++ b/libpam-sys/src/helpers.rs Mon Jun 30 22:56:26 2025 -0400 @@ -1,6 +1,7 @@ //! This module contains a few non-required helpers to deal with some of the //! more annoying memory management in the PAM API. +use super::cfg_pam_impl; use std::error::Error; use std::marker::{PhantomData, PhantomPinned}; use std::mem::ManuallyDrop; @@ -132,7 +133,7 @@ slice::from_raw_parts(*ptr_ptr.cast(), count).iter() } - #[crate::cfg_pam_impl("LinuxPam")] + #[cfg_pam_impl("LinuxPam")] unsafe fn _iter_over<'a, Src>( ptr_ptr: *const *const Src, count: usize, @@ -144,7 +145,7 @@ Self::iter_over_linux(ptr_ptr, count) } - #[crate::cfg_pam_impl(not("LinuxPam"))] + #[cfg_pam_impl(not("LinuxPam"))] unsafe fn _iter_over<'a, Src>( ptr_ptr: *const *const Src, count: usize, @@ -478,7 +479,7 @@ #[should_panic] fn test_iter_xsso_wrong_size() { unsafe { - _ = PtrPtrVec::<u8>::iter_over_xsso::<f64>(ptr::null(), 1); + let _ = PtrPtrVec::<u8>::iter_over_xsso::<f64>(ptr::null(), 1); } } @@ -488,7 +489,7 @@ #[should_panic] fn test_iter_linux_wrong_size() { unsafe { - _ = PtrPtrVec::<u128>::iter_over_linux::<()>(ptr::null(), 1); + let _ = PtrPtrVec::<u128>::iter_over_linux::<()>(ptr::null(), 1); } }