Skip to content

Contracts upgrade 0.54.0 (2) #535

Contracts upgrade 0.54.0 (2)

Contracts upgrade 0.54.0 (2) #535

GitHub Actions / clippy failed Nov 21, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (3)

contracts/mystery-box/tests/mystery_box_mod.rs|80 col 31| warning: very complex type used. Consider factoring parts into type definitions
--> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
|
80 | let mut rewards_list: MultiValueEncoded<
| ______________________^
81 | | StaticApi,
82 | | MultiValue6<
83 | | mystery_box_proxy::RewardType,
... |
89 | | >,
90 | | > = MultiValueEncoded::new();
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: #[warn(clippy::type_complexity)] on by default
contracts/mystery-box/tests/mystery_box_mod.rs|32 col 5| warning: you should consider adding a Default implementation for MysteryBoxSetup
--> contracts/mystery-box/tests/mystery_box_mod.rs:32:5
|
32 | / pub fn new() -> Self {
33 | | let mut mystery_box = MysteryBoxSetup { world: world() };
34 | |
35 | | mystery_box.world.account(OWNER).nonce(1);
... |
59 | | mystery_box
60 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: #[warn(clippy::new_without_default)] on by default
help: try adding this
|
31 + impl Default for MysteryBoxSetup {
32 + fn default() -> Self {
33 + Self::new()
34 + }
35 + }
|
contracts/mystery-box/tests/mystery_box_mod.rs|80 col 31| warning: very complex type used. Consider factoring parts into type definitions
--> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
|
80 | let mut rewards_list: MultiValueEncoded<
| ______________________^
81 | | StaticApi,
82 | | MultiValue6<
83 | | mystery_box_proxy::RewardType,
... |
89 | | >,
90 | | > = MultiValueEncoded::new();
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: #[warn(clippy::type_complexity)] on by default

Filtered Findings (0)

Annotations

Check warning on line 80 in contracts/mystery-box/tests/mystery_box_mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/mystery-box/tests/mystery_box_mod.rs#L80

warning: very complex type used. Consider factoring parts into `type` definitions
  --> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
   |
80 |           let mut rewards_list: MultiValueEncoded<
   |  _______________________________^
81 | |             StaticApi,
82 | |             MultiValue6<
83 | |                 mystery_box_proxy::RewardType,
...  |
89 | |             >,
90 | |         > = MultiValueEncoded::new();
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default
Raw output
contracts/mystery-box/tests/mystery_box_mod.rs:80:31:w:warning: very complex type used. Consider factoring parts into `type` definitions
  --> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
   |
80 |           let mut rewards_list: MultiValueEncoded<
   |  _______________________________^
81 | |             StaticApi,
82 | |             MultiValue6<
83 | |                 mystery_box_proxy::RewardType,
...  |
89 | |             >,
90 | |         > = MultiValueEncoded::new();
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default


__END__

Check warning on line 32 in contracts/mystery-box/tests/mystery_box_mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/mystery-box/tests/mystery_box_mod.rs#L32

warning: you should consider adding a `Default` implementation for `MysteryBoxSetup`
  --> contracts/mystery-box/tests/mystery_box_mod.rs:32:5
   |
32 | /     pub fn new() -> Self {
33 | |         let mut mystery_box = MysteryBoxSetup { world: world() };
34 | |
35 | |         mystery_box.world.account(OWNER).nonce(1);
...  |
59 | |         mystery_box
60 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
31 + impl Default for MysteryBoxSetup {
32 +     fn default() -> Self {
33 +         Self::new()
34 +     }
35 + }
   |
Raw output
contracts/mystery-box/tests/mystery_box_mod.rs:32:5:w:warning: you should consider adding a `Default` implementation for `MysteryBoxSetup`
  --> contracts/mystery-box/tests/mystery_box_mod.rs:32:5
   |
32 | /     pub fn new() -> Self {
33 | |         let mut mystery_box = MysteryBoxSetup { world: world() };
34 | |
35 | |         mystery_box.world.account(OWNER).nonce(1);
...  |
59 | |         mystery_box
60 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
31 + impl Default for MysteryBoxSetup {
32 +     fn default() -> Self {
33 +         Self::new()
34 +     }
35 + }
   |


__END__

Check warning on line 80 in contracts/mystery-box/tests/mystery_box_mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/mystery-box/tests/mystery_box_mod.rs#L80

warning: very complex type used. Consider factoring parts into `type` definitions
  --> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
   |
80 |           let mut rewards_list: MultiValueEncoded<
   |  _______________________________^
81 | |             StaticApi,
82 | |             MultiValue6<
83 | |                 mystery_box_proxy::RewardType,
...  |
89 | |             >,
90 | |         > = MultiValueEncoded::new();
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default
Raw output
contracts/mystery-box/tests/mystery_box_mod.rs:80:31:w:warning: very complex type used. Consider factoring parts into `type` definitions
  --> contracts/mystery-box/tests/mystery_box_mod.rs:80:31
   |
80 |           let mut rewards_list: MultiValueEncoded<
   |  _______________________________^
81 | |             StaticApi,
82 | |             MultiValue6<
83 | |                 mystery_box_proxy::RewardType,
...  |
89 | |             >,
90 | |         > = MultiValueEncoded::new();
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default


__END__