fix(fc-traits-gas-tank): return DispatchResult
when calling `make_t…
#61
clippy
2 errors, 2 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 2 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 93 in pallets/referenda-tracks/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/referenda-tracks/src/lib.rs:93:15
|
93 | #[pallet::pallet]
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
93 - #[pallet::pallet]
93 + #[pallet::&inspect_err]
|
Check warning on line 34 in pallets/template/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/template/src/lib.rs:34:15
|
34 | #[pallet::pallet]
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
34 - #[pallet::pallet]
34 + #[pallet::&inspect_err]
|
Check failure on line 130 in traits/gas-tank/src/impl_nonfungibles.rs
github-actions / clippy
the `?` operator can only be used on `Option`s, not `Result`s, in a closure that returns `Option`
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a closure that returns `Option`
--> traits/gas-tank/src/impl_nonfungibles.rs:130:62
|
113 | .find_map(|(collection, item)| {
| -------------------- this function returns an `Option`
...
130 | tank.put::<F, ItemConfig>(&collection, &item)?;
| ^ use `.ok()?` if you want to discard the `std::result::Result<std::convert::Infallible, sp_runtime::DispatchError>` error information
|
= help: the trait `std::ops::FromResidual<std::result::Result<std::convert::Infallible, sp_runtime::DispatchError>>` is not implemented for `std::option::Option<_>`
= help: the trait `std::ops::FromResidual<std::option::Option<std::convert::Infallible>>` is implemented for `std::option::Option<T>`
Check failure on line 95 in traits/gas-tank/src/impl_nonfungibles.rs
github-actions / clippy
the `?` operator can only be used on `Option`s, not `Result`s, in a closure that returns `Option`
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a closure that returns `Option`
--> traits/gas-tank/src/impl_nonfungibles.rs:95:62
|
82 | F::owned(who).find_map(|(collection, item)| {
| -------------------- this function returns an `Option`
...
95 | tank.put::<F, ItemConfig>(&collection, &item)?;
| ^ use `.ok()?` if you want to discard the `std::result::Result<std::convert::Infallible, sp_runtime::DispatchError>` error information
|
= help: the trait `std::ops::FromResidual<std::result::Result<std::convert::Infallible, sp_runtime::DispatchError>>` is not implemented for `std::option::Option<frame_support::weights::Weight>`
= help: the trait `std::ops::FromResidual<std::option::Option<std::convert::Infallible>>` is implemented for `std::option::Option<T>`