Skip to content

Catch Polytone callback errors #2188

Catch Polytone callback errors

Catch Polytone callback errors #2188

GitHub Actions / clippy failed Oct 31, 2024 in 0s

clippy

1 error

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 0
Note 0
Help 0

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check failure on line 95 in cw-orch-cli/src/commands/action/cosmwasm/instantiate/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for an equality check. Consider using `if`

error: you seem to be trying to use `match` for an equality check. Consider using `if`
  --> cw-orch-cli/src/commands/action/cosmwasm/instantiate/mod.rs:86:9
   |
86 | /         match inquire::Confirm::new("Would you like to save address in Address Book?").prompt()? {
87 | |             true => {
88 | |                 let alias = inquire::Text::new("Input new contract alias")
89 | |                     // Use label as default value
...  |
94 | |             false => (),
95 | |         };
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
   = note: `-D clippy::single-match` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::single_match)]`
help: try
   |
86 ~         if inquire::Confirm::new("Would you like to save address in Address Book?").prompt()? == true {
87 +             let alias = inquire::Text::new("Input new contract alias")
88 +                 // Use label as default value
89 +                 .with_initial_value(&scope.label)
90 +                 .prompt()?;
91 +             address_book::try_insert_account_id(chain.chain_info(), &alias, address.as_str())?;
92 ~         };
   |