proxy deployer contract #90
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (10)
contracts/proxy-deployer/src/contract_interactions.rs|80 col 65| warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: #[warn(clippy::redundant_clone)]
on by default
contracts/proxy-deployer/src/contract_interactions.rs|97 col 16| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !ongoing_upgrade_operation.contracts_remaining.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: #[warn(clippy::len_zero)]
on by default
contracts/proxy-deployer/src/contract_interactions.rs|113 col 12| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !ongoing_upgrade_operation.contracts_remaining.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
contracts/proxy-deployer/src/contract_interactions.rs|151 col 13| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !contracts_by_template.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs|35 col 24| error[E0277]: the trait bound adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>: multiversx_sc::contract_base::ProxyObjBase
is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait multiversx_sc::contract_base::ProxyObjBase
is not implemented for adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>
|
= help: the following other types implement trait multiversx_sc::contract_base::ProxyObjBase
:
multiversx_sc_modules::dns::dns_proxy::Proxy
proxy_deployer::Proxy
note: required by a bound in multiversx_sc_scenario::ContractInfo
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/multiversx-sc-scenario-0.43.4/src/facade/contract_info.rs:14:28
|
14 | pub struct ContractInfo<P: ProxyObjBase> {
| ^^^^^^^^^^^^ required by this bound in ContractInfo
contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs|35 col 24| error[E0277]: the trait bound multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>: multiversx_sc::api::vm_api::VMApi
is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait multiversx_sc::api::vm_api::VMApi
is not implemented for multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>
|
= help: the following other types implement trait multiversx_sc::api::vm_api::VMApi
:
multiversx_sc::api::external_view::ev_wrapper::ExternalViewApi
multiversx_sc::api::uncallable::UncallableApi
note: required by a bound in adder::Proxy
--> /home/runner/work/mx-contracts-rs/mx-contracts-rs/contracts/adder/src/adder.rs:7:1
|
7 | #[multiversx_sc::contract]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in Proxy
= note: this error originates in the attribute macro multiversx_sc::contract
(in Nightly builds, run with -Z macro-backtrace for more info)
contracts/proxy-deployer/src/contract_interactions.rs|80 col 65| warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: #[warn(clippy::redundant_clone)]
on by default
contracts/proxy-deployer/src/contract_interactions.rs|97 col 16| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !ongoing_upgrade_operation.contracts_remaining.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: #[warn(clippy::len_zero)]
on by default
contracts/proxy-deployer/src/contract_interactions.rs|113 col 12| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !ongoing_upgrade_operation.contracts_remaining.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
contracts/proxy-deployer/src/contract_interactions.rs|151 col 13| warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using !is_empty
is clearer and more explicit: !contracts_by_template.is_empty()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Filtered Findings (0)
Annotations
Check warning on line 80 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L80
warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:80:65:w:warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
__END__
Check warning on line 97 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L97
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:97:16:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
__END__
Check warning on line 113 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L113
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:113:12:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
__END__
Check warning on line 151 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L151
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!contracts_by_template.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:151:13:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!contracts_by_template.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
__END__
Check failure on line 35 in contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs#L35
error[E0277]: the trait bound `adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>: multiversx_sc::contract_base::ProxyObjBase` is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait `multiversx_sc::contract_base::ProxyObjBase` is not implemented for `adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>`
|
= help: the following other types implement trait `multiversx_sc::contract_base::ProxyObjBase`:
multiversx_sc_modules::dns::dns_proxy::Proxy<A>
proxy_deployer::Proxy<A>
note: required by a bound in `multiversx_sc_scenario::ContractInfo`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/multiversx-sc-scenario-0.43.4/src/facade/contract_info.rs:14:28
|
14 | pub struct ContractInfo<P: ProxyObjBase> {
| ^^^^^^^^^^^^ required by this bound in `ContractInfo`
Raw output
contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24:e:error[E0277]: the trait bound `adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>: multiversx_sc::contract_base::ProxyObjBase` is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait `multiversx_sc::contract_base::ProxyObjBase` is not implemented for `adder::Proxy<multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>>`
|
= help: the following other types implement trait `multiversx_sc::contract_base::ProxyObjBase`:
multiversx_sc_modules::dns::dns_proxy::Proxy<A>
proxy_deployer::Proxy<A>
note: required by a bound in `multiversx_sc_scenario::ContractInfo`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/multiversx-sc-scenario-0.43.4/src/facade/contract_info.rs:14:28
|
14 | pub struct ContractInfo<P: ProxyObjBase> {
| ^^^^^^^^^^^^ required by this bound in `ContractInfo`
__END__
Check failure on line 35 in contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs#L35
error[E0277]: the trait bound `multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>: multiversx_sc::api::vm_api::VMApi` is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait `multiversx_sc::api::vm_api::VMApi` is not implemented for `multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>`
|
= help: the following other types implement trait `multiversx_sc::api::vm_api::VMApi`:
multiversx_sc::api::external_view::ev_wrapper::ExternalViewApi<A>
multiversx_sc::api::uncallable::UncallableApi
note: required by a bound in `adder::Proxy`
--> /home/runner/work/mx-contracts-rs/mx-contracts-rs/contracts/adder/src/adder.rs:7:1
|
7 | #[multiversx_sc::contract]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Proxy`
= note: this error originates in the attribute macro `multiversx_sc::contract` (in Nightly builds, run with -Z macro-backtrace for more info)
Raw output
contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24:e:error[E0277]: the trait bound `multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>: multiversx_sc::api::vm_api::VMApi` is not satisfied
--> contracts/proxy-deployer/tests/proxy_deployer_blackbox_test.rs:35:24
|
35 | template_contract: TemplateContract,
| ^^^^^^^^^^^^^^^^ the trait `multiversx_sc::api::vm_api::VMApi` is not implemented for `multiversx_sc_scenario::api::VMHooksApi<multiversx_sc_scenario::api::impl_vh::static_api::StaticApiBackend>`
|
= help: the following other types implement trait `multiversx_sc::api::vm_api::VMApi`:
multiversx_sc::api::external_view::ev_wrapper::ExternalViewApi<A>
multiversx_sc::api::uncallable::UncallableApi
note: required by a bound in `adder::Proxy`
--> /home/runner/work/mx-contracts-rs/mx-contracts-rs/contracts/adder/src/adder.rs:7:1
|
7 | #[multiversx_sc::contract]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Proxy`
= note: this error originates in the attribute macro `multiversx_sc::contract` (in Nightly builds, run with -Z macro-backtrace for more info)
__END__
Check warning on line 80 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L80
warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:80:65:w:warning: redundant clone
--> contracts/proxy-deployer/src/contract_interactions.rs:80:65
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> contracts/proxy-deployer/src/contract_interactions.rs:80:52
|
80 | .contract_call::<()>(contract_address, function_name.clone())
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
__END__
Check warning on line 97 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L97
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:97:16:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:97:16
|
97 | && ongoing_upgrade_operation.contracts_remaining.len() > 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
__END__
Check warning on line 113 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L113
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:113:12:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:113:12
|
113 | if ongoing_upgrade_operation.contracts_remaining.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ongoing_upgrade_operation.contracts_remaining.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
__END__
Check warning on line 151 in contracts/proxy-deployer/src/contract_interactions.rs
github-actions / clippy
[clippy] contracts/proxy-deployer/src/contract_interactions.rs#L151
warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!contracts_by_template.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Raw output
contracts/proxy-deployer/src/contract_interactions.rs:151:13:w:warning: length comparison to zero
--> contracts/proxy-deployer/src/contract_interactions.rs:151:13
|
151 | contracts_by_template.len() > 0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!contracts_by_template.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
__END__