sync mandos with v0.54.4 #4086
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (2)
chain/vm/src/tx_execution/exec_general_tx.rs|55 col 5| warning: this if
statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: #[warn(clippy::collapsible_if)]
on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
chain/vm/src/tx_execution/exec_general_tx.rs|55 col 5| warning: this if
statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: #[warn(clippy::collapsible_if)]
on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
Filtered Findings (0)
Annotations
Check warning on line 55 in chain/vm/src/tx_execution/exec_general_tx.rs
github-actions / clippy
[clippy] chain/vm/src/tx_execution/exec_general_tx.rs#L55
warning: this `if` statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
Raw output
chain/vm/src/tx_execution/exec_general_tx.rs:55:5:w:warning: this `if` statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
__END__
Check warning on line 55 in chain/vm/src/tx_execution/exec_general_tx.rs
github-actions / clippy
[clippy] chain/vm/src/tx_execution/exec_general_tx.rs#L55
warning: this `if` statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
Raw output
chain/vm/src/tx_execution/exec_general_tx.rs:55:5:w:warning: this `if` statement can be collapsed
--> chain/vm/src/tx_execution/exec_general_tx.rs:55:5
|
55 | / if tx_input.esdt_values.is_empty() {
56 | | if !tx_input.callback_payments.egld_value.is_zero()
57 | | && tx_input.call_type == CallType::AsyncCallback
58 | | {
... |
65 | | }
66 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
55 ~ if tx_input.esdt_values.is_empty() && !tx_input.callback_payments.egld_value.is_zero() && tx_input.call_type == CallType::AsyncCallback {
56 + return TxLog {
57 + address: tx_input.from.clone(),
58 + endpoint: "transferValueOnly".into(),
59 + topics: vec![b"".to_vec(), tx_input.to.to_vec()],
60 + data,
61 + };
62 + }
|
__END__