Skip to content

Merge missing commit updating local chain #1

Merge missing commit updating local chain

Merge missing commit updating local chain #1

GitHub Actions / clippy failed Jan 23, 2025 in 1s

clippy

1 error, 20 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 20
Note 0
Help 0

Versions

  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)
  • clippy 0.1.77 (25ef9e3 2024-04-09)

Annotations

Check failure on line 10 in pallets/quest/src/benchmarking.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type annotations needed

error[E0282]: type annotations needed
  --> pallets/quest/src/benchmarking.rs:10:1
   |
10 | #[benchmarks]
   | ^^^^^^^^^^^^^ cannot infer type
   |
   = note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 10 in pallets/quest/src/benchmarking.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable statement

warning: unreachable statement
  --> pallets/quest/src/benchmarking.rs:10:1
   |
10 | #[benchmarks]
   | ^^^^^^^^^^^^^
   | |
   | unreachable statement
   | any code following this expression is unreachable
   |
   = note: `#[warn(unreachable_code)]` on by default
   = note: this warning originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 6 in pallets/quest/src/benchmarking.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `frame_system::RawOrigin`

warning: unused import: `frame_system::RawOrigin`
 --> pallets/quest/src/benchmarking.rs:6:5
  |
6 | use frame_system::RawOrigin;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 11 in pallets/quest/src/calls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`crate` references the macro call's crate

warning: `crate` references the macro call's crate
  --> pallets/quest/src/calls.rs:11:6
   |
11 |     use crate::types::{QuestId, QuestStatus, PredictedOutcome};
   |         ^^^^^ help: to reference the macro definition's crate, use: `$crate`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
   = note: `#[warn(clippy::crate_in_macro_def)]` on by default

Check warning on line 205 in pallets/roster/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this pattern reimplements `Result::unwrap_or`

warning: this pattern reimplements `Result::unwrap_or`
   --> pallets/roster/src/lib.rs:202:3
    |
202 | /         match name.try_into() {
203 | |             Ok(name) => name,
204 | |             Err(_) => [0u8; 27],
205 | |         }
    | |_________^ help: replace with: `name.try_into().unwrap_or([0u8; 27])`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
    = note: `#[warn(clippy::manual_unwrap_or)]` on by default

Check warning on line 25 in pallets/roster/src/benchmarking.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> pallets/roster/src/benchmarking.rs:25:34
   |
25 |         let roster = Rosters::<T>::get(&roster_id);
   |                                        ^^^^^^^^^^ help: change this to: `roster_id`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 38 in pallets/roster/src/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/types.rs:38:46
   |
38 |         let roster_uuid = Uuid::new_v3(&namespace, &title);
   |                                                    ^^^^^^ help: change this to: `title`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 93 in pallets/roster/src/calls/rosters.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> pallets/roster/src/calls/rosters.rs:93:33
   |
93 |             Nominations::<T>::try_mutate(&nominee, &roster_id, |nomination| -> DispatchResult {
   |                                          ^^^^^^^^ help: change this to: `nominee`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 64 in pallets/roster/src/calls/rosters.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `new` usually return `Self`

warning: methods called `new` usually return `Self`
  --> pallets/roster/src/calls/rosters.rs:34:2
   |
34 | /     pub(crate) fn new(founder: T::AccountId, title: Vec<u8>) -> DispatchResultWithPostInfo {
35 | |         let bounded_title: BoundedVec<_, _> =
36 | |             title.try_into().map_err(|_| Error::<T>::InvalidRosterTitle)?;
37 | |         let roster_id = RosterId::from_tuple::<T>((&founder, &bounded_title));
...  |
63 | |         Ok(().into())
64 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self

Check warning on line 26 in pallets/roster/src/calls/rosters.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> pallets/roster/src/calls/rosters.rs:26:28
   |
26 |         Rosters::<T>::try_mutate(&roster_id, |mut_roster| -> DispatchResult {
   |                                  ^^^^^^^^^^ help: change this to: `roster_id`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 326 in pallets/roster/src/calls/nominations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> pallets/roster/src/calls/nominations.rs:326:5
    |
326 |                 return Err(Error::<T>::RosterDoesNotExist.into());
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
326 -                 return Err(Error::<T>::RosterDoesNotExist.into());
326 +                 Err(Error::<T>::RosterDoesNotExist.into())
    |

Check warning on line 273 in pallets/roster/src/calls/nominations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> pallets/roster/src/calls/nominations.rs:273:5
    |
273 |                 return Err(Error::<T>::RosterDoesNotExist.into());
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
273 -                 return Err(Error::<T>::RosterDoesNotExist.into());
273 +                 Err(Error::<T>::RosterDoesNotExist.into())
    |

Check warning on line 121 in pallets/roster/src/calls/nominations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `new` usually return `Self`

warning: methods called `new` usually return `Self`
   --> pallets/roster/src/calls/nominations.rs:78:2
    |
78  | /     pub(crate) fn new(
79  | |         nominator: T::AccountId,
80  | |         roster_id: RosterId,
81  | |         nominee: T::AccountId,
...   |
120 | |         Ok(().into())
121 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self

Check warning on line 65 in pallets/roster/src/calls/nominations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/calls/nominations.rs:65:63
   |
65 |         let percentage_elapsed = Self::calculate_percentage_elapsed(&nomination)?;
   |                                                                     ^^^^^^^^^^^ help: change this to: `nomination`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 77 in pallets/roster/src/calls/expulsions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/calls/expulsions.rs:77:35
   |
77 |         ensure!(roster.members.contains(&seconder), Error::<T>::PermissionDenied);
   |                                         ^^^^^^^^^ help: change this to: `seconder`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 48 in pallets/roster/src/calls/expulsions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/calls/expulsions.rs:48:29
   |
48 |             !Self::in_lockout_period(&motioner, &roster.id),
   |                                      ^^^^^^^^^ help: change this to: `motioner`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 45 in pallets/roster/src/calls/expulsions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/calls/expulsions.rs:45:35
   |
45 |         ensure!(roster.members.contains(&subject), Error::<T>::NotAMember);
   |                                         ^^^^^^^^ help: change this to: `subject`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 43 in pallets/roster/src/calls/expulsions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> pallets/roster/src/calls/expulsions.rs:43:35
   |
43 |         ensure!(roster.members.contains(&motioner), Error::<T>::NotAMember);
   |                                         ^^^^^^^^^ help: change this to: `motioner`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 15 in pallets/roster/src/calls/expulsions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> pallets/roster/src/calls/expulsions.rs:15:21
   |
15 |         Rosters::<T>::get(&roster_id)
   |                           ^^^^^^^^^^ help: change this to: `roster_id`
   |
   = 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

Check warning on line 5 in pallets/roster/src/events.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`crate` references the macro call's crate

warning: `crate` references the macro call's crate
 --> pallets/roster/src/events.rs:5:6
  |
5 |     use crate::RosterStatus;
  |         ^^^^^ help: to reference the macro definition's crate, use: `$crate`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def

Check warning on line 9 in pallets/roster/src/calls/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`crate` references the macro call's crate

warning: `crate` references the macro call's crate
 --> pallets/roster/src/calls/mod.rs:9:6
  |
9 |     use crate::calls::{
  |         ^^^^^ help: to reference the macro definition's crate, use: `$crate`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
  = note: `#[warn(clippy::crate_in_macro_def)]` on by default