Skip to content

Commit

Permalink
fix: cargo clippy warning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Al3xGROS committed Apr 19, 2024
1 parent ac91d5e commit af4e386
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions crates/ash_cli/src/avalanche/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ fn list(
) -> Result<(), CliError> {
let mut network = load_network(network_name, config)?;
update_network_subnets(&mut network)?;
let subnet;
let validators;

update_subnet_validators(&mut network, subnet_id)?;
subnet = network
let subnet = network
.get_subnet(parse_id(subnet_id)?)
.map_err(|e| CliError::dataerr(format!("Error listing validators: {e}")))?;
validators = subnet.validators.clone();
let validators = subnet.validators.clone();
format!(
"Found {} validators on Subnet '{}':",
type_colorize(&subnet.validators.len()),
Expand Down Expand Up @@ -234,10 +232,7 @@ fn add(
start_time_parsed,
end_time_parsed,
delegation_fee,
match signer {
Some(_) => Some(signer_parsed),
None => None,
},
signer.map(|_| signer_parsed),
wait,
)
.await
Expand Down Expand Up @@ -309,11 +304,6 @@ pub(crate) fn parse(
ValidatorSubcommands::Info { id } => {
info(&validator.network, &validator.subnet_id, &id, config, json)
}
ValidatorSubcommands::List => list(
&validator.network,
&validator.subnet_id,
config,
json,
),
ValidatorSubcommands::List => list(&validator.network, &validator.subnet_id, config, json),
}
}

0 comments on commit af4e386

Please sign in to comment.