Skip to content

fix(fc-traits-gas-tank): return DispatchResult when calling `make_t… #61

fix(fc-traits-gas-tank): return DispatchResult when calling `make_t…

fix(fc-traits-gas-tank): return DispatchResult when calling `make_t… #61

Triggered via push December 13, 2024 16:43
Status Failure
Total duration 59s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 6 warnings
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#L130
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>`
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#L95
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>`
check
Process completed with exit code 101.
clippy
Clippy had exited with the 101 exit code
test
Process completed with exit code 101.
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
using `map_err` over `inspect_err`: pallets/referenda-tracks/src/lib.rs#L93
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] |
using `map_err` over `inspect_err`: pallets/template/src/lib.rs#L34
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
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636