Skip to content

Add potlock contract interactor tests #470

Add potlock contract interactor tests

Add potlock contract interactor tests #470

GitHub Actions / clippy succeeded Sep 6, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (4)

contracts/nft-minter/src/nft_module.rs|127 col 41| warning: the borrowed expression implements the required traits
--> contracts/nft-minter/src/nft_module.rs:127:41
|
127 | self.nft_token_id().set(&token_id.unwrap_esdt());
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: token_id.unwrap_esdt()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: #[warn(clippy::needless_borrows_for_generic_args)] on by default
contracts/potlock/interact-rs/src/potlock_interactor_main.rs|652 col 9| warning: returning the result of a let binding from a block
--> contracts/potlock/interact-rs/src/potlock_interactor_main.rs:663:9
|
652 | / let result_value = self
653 | | .interactor
654 | | .query()
655 | | .to(self.state.current_address())
... |
660 | | .run()
661 | | .await;
| |- unnecessary let binding
662 |
663 | result_value
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: #[warn(clippy::let_and_return)] on by default
help: return the expression directly
|
652 ~
653 |
654 ~ self
655 + .interactor
656 + .query()
657 + .to(self.state.current_address())
658 + .typed(proxy::PotlockProxy)
659 + .fee_amount()
660 + .returns(ReturnsResultUnmanaged)
661 + .prepare_async()
662 + .run()
663 + .await
|
contracts/potlock/interact-rs/src/potlock_interactor_main.rs|652 col 9| warning: returning the result of a let binding from a block
--> contracts/potlock/interact-rs/src/potlock_interactor_main.rs:663:9
|
652 | / let result_value = self
653 | | .interactor
654 | | .query()
655 | | .to(self.state.current_address())
... |
660 | | .run()
661 | | .await;
| |
- unnecessary let binding
662 |
663 | result_value
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: #[warn(clippy::let_and_return)] on by default
help: return the expression directly
|
652 ~
653 |
654 ~ self
655 + .interactor
656 + .query()
657 + .to(self.state.current_address())
658 + .typed(proxy::PotlockProxy)
659 + .fee_amount()
660 + .returns(ReturnsResultUnmanaged)
661 + .prepare_async()
662 + .run()
663 + .await
|
contracts/nft-minter/src/nft_module.rs|127 col 41| warning: the borrowed expression implements the required traits
--> contracts/nft-minter/src/nft_module.rs:127:41
|
127 | self.nft_token_id().set(&token_id.unwrap_esdt());
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: token_id.unwrap_esdt()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: #[warn(clippy::needless_borrows_for_generic_args)] on by default