# HG changeset patch # User Paul Fisher # Date 1753913271 14400 # Node ID dba9c1f40883359bd3494f8f0cce081e22396697 # Parent 6c75fb621b556a26677c5798b1497f3455b7d6c3 Get rid of unnecessary `style_const` module in question.rs. diff -r 6c75fb621b55 -r dba9c1f40883 src/libpam/question.rs --- 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.