From 2aea9504c4894b3bddf9cd4d2d6cba889307c157 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Tue, 5 Mar 2024 23:44:48 -0500 Subject: [PATCH] fix: Use SCREAMING_SNAKE_CASE for static variable `authors` --- clap_builder/src/macros.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clap_builder/src/macros.rs b/clap_builder/src/macros.rs index 767ea94bc02..26d14742972 100644 --- a/clap_builder/src/macros.rs +++ b/clap_builder/src/macros.rs @@ -42,14 +42,14 @@ macro_rules! crate_version { #[macro_export] macro_rules! crate_authors { ($sep:expr) => {{ - static authors: &str = env!("CARGO_PKG_AUTHORS"); - if authors.contains(':') { + static AUTHORS: &str = env!("CARGO_PKG_AUTHORS"); + if AUTHORS.contains(':') { static CACHED: std::sync::OnceLock = std::sync::OnceLock::new(); - let s = CACHED.get_or_init(|| authors.replace(':', $sep)); + let s = CACHED.get_or_init(|| AUTHORS.replace(':', $sep)); let s: &'static str = &*s; s } else { - authors + AUTHORS } }}; () => {