Mercurial > crates > nonstick
comparison libpam-sys/src/helpers.rs @ 110:2346fd501b7a
Add tests for constants and do other macro niceties.
- Adds tests for all the constants. Pretty sweet.
- Moves documentation for cfg-pam-impl macro to `libpam-sys`.
- Renames `Illumos` to `Sun`.
- other stuff
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 02:15:46 -0400 |
parents | bb465393621f |
children |
comparison
equal
deleted
inserted
replaced
109:bb465393621f | 110:2346fd501b7a |
---|---|
1 //! This module contains a few non-required helpers to deal with some of the | 1 //! This module contains a few non-required helpers to deal with some of the |
2 //! more annoying memory management in the PAM API. | 2 //! more annoying memory management in the PAM API. |
3 use crate::structs::BinaryPayload; | 3 use crate::structs::BinaryPayload; |
4 use std::error::Error; | |
4 use std::fmt; | 5 use std::fmt; |
6 use std::mem::ManuallyDrop; | |
5 use std::ptr::NonNull; | 7 use std::ptr::NonNull; |
6 use std::error::Error; | |
7 use std::mem::ManuallyDrop; | |
8 | 8 |
9 /// Error returned when attempting to allocate a buffer that is too big. | 9 /// Error returned when attempting to allocate a buffer that is too big. |
10 /// | 10 /// |
11 /// This is specifically used in [`OwnedBinaryPayload`] when you try to allocate | 11 /// This is specifically used in [`OwnedBinaryPayload`] when you try to allocate |
12 /// a message larger than 2<sup>32</sup> bytes. | 12 /// a message larger than 2<sup>32</sup> bytes. |