refact(action)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)*
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user