Skip to content

Commit

Permalink
refactor: rename enum_variants_for_help macro
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexD10S committed Nov 5, 2024
1 parent ef7a691 commit 7e42531
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions crates/pop-cli/src/commands/new/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use cliclack::{
outro, outro_cancel,
};
use pop_common::{
enum_variants, enum_variants_for_help,
enum_variants, enum_variants_without_deprecated,
templates::{Template, Type},
Git, GitHub, Release,
};
Expand All @@ -40,7 +40,7 @@ pub struct NewParachainCommand {
#[arg(
short = 't',
long,
help = format!("Template to use. [possible values: {}]", enum_variants_for_help!(Parachain)),
help = format!("Template to use. [possible values: {}]", enum_variants_without_deprecated!(Parachain)),
value_parser = enum_variants!(Parachain),
hide_possible_values = true // Hide the deprecated templates
)]
Expand Down Expand Up @@ -268,8 +268,8 @@ fn get_customization_value(
decimals: Option<u8>,
initial_endowment: Option<String>,
) -> Result<Config> {
if !matches!(template, Parachain::Standard) &&
(symbol.is_some() || decimals.is_some() || initial_endowment.is_some())
if !matches!(template, Parachain::Standard)
&& (symbol.is_some() || decimals.is_some() || initial_endowment.is_some())
{
log::warning("Customization options are not available for this template")?;
sleep(Duration::from_secs(3))
Expand Down
2 changes: 1 addition & 1 deletion crates/pop-common/src/templates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ macro_rules! enum_variants {
}

#[macro_export]
macro_rules! enum_variants_for_help {
macro_rules! enum_variants_without_deprecated {
($e:ty) => {{
<$e>::VARIANTS
.iter()
Expand Down

0 comments on commit 7e42531

Please sign in to comment.