Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user total farm position split #932

Merged
merged 6 commits into from
Jul 31, 2024

Merge pull request #935 from multiversx/remove-setAllowExternalClaim-…

d2ae880
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

user total farm position split #932

Merge pull request #935 from multiversx/remove-setAllowExternalClaim-…
d2ae880
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Jul 31, 2024 in 1s

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