Mercurial > crates > nonstick
changeset 179:dba9c1f40883
Get rid of unnecessary `style_const` module in question.rs.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 30 Jul 2025 18:07:51 -0400 |
parents | 6c75fb621b55 |
children | a1bb1d013567 |
files | src/libpam/question.rs |
diffstat | 1 files changed, 6 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/libpam/question.rs Wed Jul 30 18:02:36 2025 -0400 +++ b/src/libpam/question.rs Wed Jul 30 18:07:51 2025 -0400 @@ -11,37 +11,27 @@ use std::os::unix::ffi::OsStrExt; use std::ptr::NonNull; -mod style_const { - pub use libpam_sys::*; - #[cfg(not(feature = "link"))] - #[cfg_pam_impl(not("LinuxPam"))] - pub const PAM_RADIO_TYPE: i32 = 897; - #[cfg(not(feature = "link"))] - #[cfg_pam_impl(not("LinuxPam"))] - pub const PAM_BINARY_PROMPT: i32 = 10010101; -} - /// The C enum values for messages shown to the user. #[derive(Debug, PartialEq, TryFromPrimitive, IntoPrimitive)] #[repr(i32)] enum Style { /// Requests information from the user; will be masked when typing. - PromptEchoOff = style_const::PAM_PROMPT_ECHO_OFF, + PromptEchoOff = libpam_sys::PAM_PROMPT_ECHO_OFF, /// Requests information from the user; will not be masked. - PromptEchoOn = style_const::PAM_PROMPT_ECHO_ON, + PromptEchoOn = libpam_sys::PAM_PROMPT_ECHO_ON, /// An error message. - ErrorMsg = style_const::PAM_ERROR_MSG, + ErrorMsg = libpam_sys::PAM_ERROR_MSG, /// An informational message. - TextInfo = style_const::PAM_TEXT_INFO, + TextInfo = libpam_sys::PAM_TEXT_INFO, /// Yes/No/Maybe conditionals. A Linux-PAM extension. #[cfg(feature = "linux-pam-ext")] - RadioType = style_const::PAM_RADIO_TYPE, + RadioType = libpam_sys::PAM_RADIO_TYPE, /// For server–client non-human interaction. /// /// NOT part of the X/Open PAM specification. /// A Linux-PAM extension. #[cfg(feature = "linux-pam-ext")] - BinaryPrompt = style_const::PAM_BINARY_PROMPT, + BinaryPrompt = libpam_sys::PAM_BINARY_PROMPT, } /// A question sent by PAM or a module to an application.