Farm Staking Proxy Legacy SC #99
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (0)
Filtered Findings (14)
locked-asset/locked-token-wrapper/src/wrapped_token.rs|60 col 31| warning: use of deprecated struct multiversx_sc::imports::ESDTSystemSmartContractProxy
: There is a new ESDTSystemSCProxy
, which uses the new proxy model.
--> locked-asset/locked-token-wrapper/src/wrapped_token.rs:60:31
|
60 | let system_sc_proxy = ESDTSystemSmartContractProxy::new_proxy_obj();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)]
on by default
energy-integration/governance-v2/tests/gov_test_setup/mod.rs|38 col 12| warning: struct Payment
is never constructed
--> energy-integration/governance-v2/tests/gov_test_setup/mod.rs:38:12
|
38 | pub struct Payment {
| ^^^^^^^
|
= note: Payment
has a derived impl for the trait Clone
, but this is intentionally ignored during dead code analysis
= note: #[warn(dead_code)]
on by default
dex/pair/tests/pair_rs_test.rs|1392 col 21| warning: useless use of vec!
--> dex/pair/tests/pair_rs_test.rs:1392:21
|
1392 | let transfers = vec![
| ________________^
1393 | | TxTokenTransfer {
1394 | | token_identifier: LOCKED_TOKEN_ID.to_vec(),
1395 | | nonce: 1,
... |
1402 | | },
1403 | | ];
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: #[warn(clippy::useless_vec)]
on by default
help: you can use an array directly
|
1392 ~ let transfers = [TxTokenTransfer {
1393 + token_identifier: LOCKED_TOKEN_ID.to_vec(),
1394 + nonce: 1,
1395 + value: rust_biguint!(500_000),
1396 + },
1397 + TxTokenTransfer {
1398 + token_identifier: MEX_TOKEN_ID.to_vec(),
1399 + nonce: 0,
1400 + value: rust_biguint!(500_000),
1401 ~ }];
|
locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs|60 col 12| warning: fields owner
, second_user
, and farm_locked_wrapper
are never read
--> locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs:68:9
|
60 | pub struct ProxySetup<ProxyObjBuilder, PairObjBuilder, FarmLockedObjBuilder, SimpleLockObjBuilder>
| ---------- fields in this struct
...
68 | pub owner: Address,
| ^^^^^
69 | pub first_user: Address,
70 | pub second_user: Address,
| ^^^^^^^^^^^
...
73 | pub farm_locked_wrapper:
| ^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
dex/tests/dex_scenario_rs_test.rs|5 col 16| warning: use of deprecated method multiversx_sc_scenario::ScenarioWorld::set_current_dir_from_workspace
: No longer needed, simply delete.
--> dex/tests/dex_scenario_rs_test.rs:5:16
|
5 | blockchain.set_current_dir_from_workspace("dex");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)]
on by default
locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs|60 col 12| warning: field second_user
is never read
--> locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs:70:9
|
60 | pub struct ProxySetup<ProxyObjBuilder, PairObjBuilder, FarmLockedObjBuilder, SimpleLockObjBuilder>
| ---------- field in this struct
...
70 | pub second_user: Address,
| ^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
dex/fuzz/src/fuzz_data.rs|146 col 16| warning: field owner_address
is never read
--> dex/fuzz/src/fuzz_data.rs:154:13
|
146 | pub struct FuzzerData<PairObjBuilder, FarmObjBuilder, FactoryObjBuilder, PriceDiscObjBuilder>
| ---------- field in this struct
...
154 | pub owner_address: Address,
| ^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
dex/fuzz/src/fuzz_data.rs|587 col 16| warning: field locking_sc_address
is never read
--> dex/fuzz/src/fuzz_data.rs:593:13
|
587 | pub struct PriceDiscSetup
| -------------- field in this struct
...
593 | pub locking_sc_address: Address,
| ^^^^^^^^^^^^^^^^^^
dex/fuzz/src/fuzz_factory.rs|151 col 17| warning: assigning the result of Clone::clone()
may be inefficient
--> dex/fuzz/src/fuzz_factory.rs:151:17
|
151 | amount_to_unlock = locked_token_before.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use clone_from()
: amount_to_unlock.clone_from(&locked_token_before)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: #[warn(clippy::assigning_clones)]
on by default
dex/fuzz/src/fuzz_farm.rs|71 col 59| warning: unnecessary use of get(&caller.address).is_some()
--> dex/fuzz/src/fuzz_farm.rs:71:59
|
71 | if merge_farm_positions && farm_setup.farmer_info.get(&caller.address).is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: contains_key(&caller.address)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
= note: #[warn(clippy::unnecessary_get_then_check)]
on by default
dex/fuzz/src/fuzz_farm.rs|243 col 35| warning: unnecessary use of get(&caller.address).is_some()
--> dex/fuzz/src/fuzz_farm.rs:243:35
|
243 | if farm_setup.farmer_info.get(&caller.address).is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: contains_key(&caller.address)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
dex/fuzz/src/fuzz_farm.rs|353 col 35| warning: unnecessary use of get(&caller.address).is_some()
--> dex/fuzz/src/fuzz_farm.rs:353:35
|
353 | if farm_setup.farmer_info.get(&caller.address).is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: contains_key(&caller.address)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
dex/fuzz/src/fuzz_price_discovery.rs|326 col 17| warning: assigning the result of Clone::clone()
may be inefficient
--> dex/fuzz/src/fuzz_price_discovery.rs:326:17
|
326 | redeem_token_amount_in = redeem_token_before.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use clone_from()
: redeem_token_amount_in.clone_from(&redeem_token_before)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
locked-asset/locked-token-wrapper/src/wrapped_token.rs|60 col 31| warning: use of deprecated struct multiversx_sc::imports::ESDTSystemSmartContractProxy
: There is a new ESDTSystemSCProxy
, which uses the new proxy model.
--> locked-asset/locked-token-wrapper/src/wrapped_token.rs:60:31
|
60 | let system_sc_proxy = ESDTSystemSmartContractProxy::new_proxy_obj();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)]
on by default