Skip to content

V3.0 legacy contracts #137

V3.0 legacy contracts

V3.0 legacy contracts #137

GitHub Actions / clippy succeeded Aug 3, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (6)

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
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 ~ }];
|