From 79c9e51e8c9084337c88bccce3aec861efb9ba74 Mon Sep 17 00:00:00 2001 From: steven-omaha <35634100+steven-omaha@users.noreply.github.com> Date: Tue, 23 May 2023 13:11:49 +0200 Subject: [PATCH] refact(action) --- crates/pacdef_core/src/action.rs | 2 +- crates/pacdef_macros/src/action.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/pacdef_core/src/action.rs b/crates/pacdef_core/src/action.rs index 31ce1fa..fd21253 100644 --- a/crates/pacdef_core/src/action.rs +++ b/crates/pacdef_core/src/action.rs @@ -1,6 +1,6 @@ use pacdef_macros::Action; -/// All actions the program can perform. Variants of the enum relate to +/// All main actions the program can perform. Variants of the enum relate to /// the different subcommands. #[derive(Debug, Action)] pub enum Actions { diff --git a/crates/pacdef_macros/src/action.rs b/crates/pacdef_macros/src/action.rs index 43bb6a8..47ef05b 100644 --- a/crates/pacdef_macros/src/action.rs +++ b/crates/pacdef_macros/src/action.rs @@ -63,7 +63,8 @@ where { let expanded = quote! { impl #name { - pub const fn name(&self) -> &'static str { + /// Return the lowercase name of the enum variant as `&str`. + const fn name(&self) -> &'static str { match self { #(#variant_description)* }