Mercurial > crates > nonstick
diff libpam-sys/src/lib.rs @ 174:9e4ce1631bd3
Dramatically expand documentation.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 29 Jul 2025 18:58:27 -0400 |
parents | a75a66cb4181 |
children | 0730f5f2ee2a |
line wrap: on
line diff
--- a/libpam-sys/src/lib.rs Tue Jul 29 16:52:32 2025 -0400 +++ b/libpam-sys/src/lib.rs Tue Jul 29 18:58:27 2025 -0400 @@ -8,7 +8,6 @@ //! - The [`aliases`] submodule, which contains convenient aliases //! for callback types used in libpam, so you don't have to type //! `unsafe extern "C" fn(this is so long)` all the time. -//! #![doc = concat!("This documentation was built for the **", pam_impl_name!(), "** implementation.")] //! //! You can override this **at build time** by setting the `LIBPAMSYS_IMPL` @@ -411,13 +410,11 @@ /// # let service = CString::new("whatever").unwrap(); /// # let user = CString::new("whatever").unwrap(); /// let mut handle: *mut pam_handle = ptr::null_mut(); - /// let mut conv = pam_conv{ + /// let mut conv = pam_conv { /// conv: openpam_ttyconv, /// appdata_ptr: ptr::null_mut(), /// }; - /// let result = unsafe { pam_start( - /// service.as_ptr(), user.as_ptr(), &mut conv, &mut handle - /// ) }; + /// let result = unsafe { pam_start(service.as_ptr(), user.as_ptr(), &mut conv, &mut handle) }; /// ``` pub fn openpam_ttyconv( n: c_int, @@ -437,13 +434,11 @@ /// # let service = CString::new("whatever").unwrap(); /// # let user = CString::new("whatever").unwrap(); /// let mut handle: *mut pam_handle = ptr::null_mut(); - /// let mut conv = pam_conv{ + /// let mut conv = pam_conv { /// conv: openpam_nullconv, /// appdata_ptr: ptr::null_mut(), /// }; - /// let result = unsafe { pam_start( - /// service.as_ptr(), user.as_ptr(), &mut conv, &mut handle - /// ) }; + /// let result = unsafe { pam_start(service.as_ptr(), user.as_ptr(), &mut conv, &mut handle) }; /// ``` pub fn openpam_nullconv( n: c_int,