Skip to content

Commit ea8b254

Browse files
committed
refactor(cli): Fix clippy warnings
1 parent 5d362d1 commit ea8b254

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

cli/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ pub enum Command {
199199
/// no "CHECK" comments where normally required
200200
#[clap(long)]
201201
skip_lint: bool,
202-
/// Skip checking for program ID mismatch between keypair and declare_id
203-
#[clap(long)]
204-
ignore_keys: bool,
205202
/// Flag to skip starting a local validator, if the configured cluster
206203
/// url is a localnet.
207204
#[clap(long)]
@@ -870,7 +867,6 @@ fn process_command(opts: Opts) -> Result<()> {
870867
env,
871868
cargo_args,
872869
skip_lint,
873-
ignore_keys,
874870
arch,
875871
} => test(
876872
&opts.cfg_override,
@@ -879,7 +875,6 @@ fn process_command(opts: Opts) -> Result<()> {
879875
skip_local_validator,
880876
skip_build,
881877
skip_lint,
882-
ignore_keys,
883878
no_idl,
884879
detach,
885880
run,
@@ -2957,7 +2952,6 @@ fn test(
29572952
skip_local_validator: bool,
29582953
skip_build: bool,
29592954
skip_lint: bool,
2960-
ignore_keys: bool,
29612955
no_idl: bool,
29622956
detach: bool,
29632957
tests_to_run: Vec<String>,
@@ -3652,7 +3646,7 @@ fn deploy(
36523646
let retry_delay = std::time::Duration::from_millis(500);
36533647
let cache_delay = std::time::Duration::from_secs(2);
36543648

3655-
println!("Waiting for program {} to be confirmed...", program_id);
3649+
println!("Waiting for program {program_id} to be confirmed...");
36563650

36573651
for attempt in 0..max_retries {
36583652
if let Ok(account) = client.get_account(&program_id) {

cli/src/rust_template.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ pub fn create_program(name: &str, template: ProgramTemplate, with_mollusk: bool)
5858
fn rust_toolchain_toml() -> String {
5959
format!(
6060
r#"[toolchain]
61-
channel = "{msrv}"
61+
channel = "{ANCHOR_MSRV}"
6262
components = ["rustfmt","clippy"]
6363
profile = "minimal"
64-
"#,
65-
msrv = ANCHOR_MSRV
64+
"#
6665
)
6766
}
6867

@@ -750,15 +749,12 @@ name = "tests"
750749
version = "0.1.0"
751750
description = "Created with Anchor"
752751
edition = "2021"
753-
rust-version = "{msrv}"
752+
rust-version = "{ANCHOR_MSRV}"
754753
755754
[dependencies]
756-
anchor-client = "{version}"
755+
anchor-client = "{VERSION}"
757756
{name} = {{ version = "0.1.0", path = "../programs/{name}" }}
758-
"#,
759-
msrv = ANCHOR_MSRV,
760-
version = VERSION,
761-
name = name,
757+
"#
762758
)
763759
}
764760

0 commit comments

Comments
 (0)