Skip to content

Commit

Permalink
cargo +nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ndkazu committed Dec 13, 2024
1 parent 509ef3c commit 0cbabc5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions crates/pop-cli/src/commands/build/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ impl BuildSpecCommand {
// Output file.
let maybe_chain_spec_file = PathBuf::from(&chain);
// Check if the provided chain specification is a file.
let (output_file, prompt) = if maybe_chain_spec_file.exists()
&& maybe_chain_spec_file.is_file()
let (output_file, prompt) = if maybe_chain_spec_file.exists() &&
maybe_chain_spec_file.is_file()
{
if output_file.is_some() {
cli.warning("NOTE: If an existing chain spec file is provided it will be used for the output path.")?;
Expand Down
5 changes: 2 additions & 3 deletions crates/pop-cli/src/commands/install/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,11 @@ async fn install_rustup() -> anyhow::Result<()> {
async fn install_homebrew() -> anyhow::Result<()> {
match cmd("which", vec!["brew"]).read() {
Ok(output) => log::info(format!("ℹ️ Homebrew installed already at {}.", output))?,
Err(_) => {
Err(_) =>
run_external_script(
"https://raw.githubusercontent.com/Homebrew/install/master/install.sh",
)
.await?
},
.await?,
}
Ok(())
}
Expand Down
10 changes: 5 additions & 5 deletions crates/pop-cli/src/commands/new/pallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ impl NewPalletCommand {
let mut pallet_custom_origin = false;

if let Some(Mode::Advanced(advanced_mode_args)) = &self.mode {
if advanced_mode_args.config_common_types.is_empty()
&& advanced_mode_args.storage.is_empty()
&& !(advanced_mode_args.genesis_config
|| advanced_mode_args.default_config
|| advanced_mode_args.custom_origin)
if advanced_mode_args.config_common_types.is_empty() &&
advanced_mode_args.storage.is_empty() &&
!(advanced_mode_args.genesis_config ||
advanced_mode_args.default_config ||
advanced_mode_args.custom_origin)
{
Cli.info("Generate the pallet's config trait.")?;

Expand Down
4 changes: 2 additions & 2 deletions crates/pop-cli/src/commands/new/parachain.rs
Original file line number Diff line number Diff line change
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
9 changes: 4 additions & 5 deletions crates/pop-cli/src/commands/up/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl ZombienetCommand {
.await
{
Ok(n) => n,
Err(e) => {
Err(e) =>
return match e {
Error::Config(message) => {
outro_cancel(format!("🚫 A configuration error occurred: `{message}`"))?;
Expand All @@ -82,8 +82,7 @@ impl ZombienetCommand {
Ok(())
},
_ => Err(e.into()),
}
},
},
};

// Source any missing/stale binaries
Expand Down Expand Up @@ -202,8 +201,8 @@ impl ZombienetCommand {
))
.dim()
.to_string();
if !skip_confirm
&& !confirm(format!(
if !skip_confirm &&
!confirm(format!(
"📦 Would you like to source them automatically now? It may take some time...\n {list}"))
.initial_value(true)
.interact()?
Expand Down

0 comments on commit 0cbabc5

Please sign in to comment.