Mercurial > crates > nonstick
diff libpam-sys/libpam-sys-impls/build.rs @ 113:178310336596
Fix up more constants, make things i32 rather than u32.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 03:11:33 -0400 |
parents | 2346fd501b7a |
children |
line wrap: on
line diff
--- a/libpam-sys/libpam-sys-impls/build.rs Sun Jun 29 02:21:26 2025 -0400 +++ b/libpam-sys/libpam-sys-impls/build.rs Sun Jun 29 03:11:33 2025 -0400 @@ -6,10 +6,10 @@ //! 2. It detects the current PAM implementation and sets an env var for //! the macros in `libpam-sys-impl`. +use proc_macro2::TokenStream; +use quote::quote; use std::{env, fs}; use strum::EnumString; -use proc_macro2::TokenStream; -use quote::quote; fn main() { let pam_impl = match option_env!("LIBPAMSYS_IMPL") { @@ -25,10 +25,7 @@ target_os = "openbsd" )) { PamImpl::OpenPam - } else if cfg!(any( - target_os = "illumos", - target_os = "solaris", - )) { + } else if cfg!(any(target_os = "illumos", target_os = "solaris",)) { PamImpl::Sun } else { PamImpl::MinimalOpenPam @@ -53,7 +50,11 @@ Err(_) => panic!("unknown PAM implementation {other:?}"), }, }; - fs::write(format!("{}/pam_impl_enum.rs", env::var("OUT_DIR").unwrap()), PamImpl::enum_tokens().to_string()).unwrap(); + fs::write( + format!("{}/pam_impl_enum.rs", env::var("OUT_DIR").unwrap()), + PamImpl::enum_tokens().to_string(), + ) + .unwrap(); println!("cargo:rustc-env=LIBPAMSYS_IMPL={pam_impl:?}"); }