GitHub Actions / clippy
failed
Jul 31, 2024 in 0s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.0 (051478957 2024-07-21)
- cargo 1.80.0 (376290515 2024-07-16)
- clippy 0.1.80 (0514789 2024-07-21)
Annotations
Check failure on line 366 in pallets/api/src/fungibles/mod.rs
github-actions / clippy
use of moved value: `id`
error[E0382]: use of moved value: `id`
--> pallets/api/src/fungibles/mod.rs:366:45
|
365 | AssetsOf::<T>::set_metadata(origin, id.into(), name.clone(), symbol.clone(), decimals)?;
| ------ `id` moved due to this method call
366 | Self::deposit_event(Event::SetMetadata { id, name, symbol, decimals });
| ^^ value used here after move
|
note: `std::convert::Into::into` takes ownership of the receiver `self`, which moves `id`
--> /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:450:13
|
450 | fn into(self) -> T;
| ^^^^
= note: move occurs because `id` has type `<T as pallet_assets::Config<<T as fungibles::pallet::Config>::AssetsInstance>>::AssetId`, which does not implement the `Copy` trait
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
365 | AssetsOf::<T>::set_metadata(origin, id.clone().into(), name.clone(), symbol.clone(), decimals)?;
| ++++++++
Check failure on line 333 in pallets/api/src/fungibles/mod.rs
github-actions / clippy
use of moved value: `id`
error[E0382]: use of moved value: `id`
--> pallets/api/src/fungibles/mod.rs:333:40
|
328 | id.into(),
| ------ `id` moved due to this method call
...
333 | Self::deposit_event(Event::Create { id, owner, admin });
| ^^ value used here after move
|
note: `std::convert::Into::into` takes ownership of the receiver `self`, which moves `id`
--> /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:450:13
|
450 | fn into(self) -> T;
| ^^^^
= note: move occurs because `id` has type `<T as pallet_assets::Config<<T as fungibles::pallet::Config>::AssetsInstance>>::AssetId`, which does not implement the `Copy` trait
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
328 | id.clone().into(),
| ++++++++
Loading