Update template pallet to latest enum syntax (#12552)

This commit is contained in:
Sacha Lansky
2022-10-24 20:10:18 +02:00
committed by GitHub
parent 6201ccaf8f
commit 54204d7628
@@ -45,7 +45,7 @@ pub mod pallet {
pub enum Event<T: Config> {
/// Event documentation should end with an array that provides descriptive names for event
/// parameters. [something, who]
SomethingStored(u32, T::AccountId),
SomethingStored { something: u32, who: T::AccountId },
}
// Errors inform users that something went wrong.
@@ -75,7 +75,7 @@ pub mod pallet {
<Something<T>>::put(something);
// Emit an event.
Self::deposit_event(Event::SomethingStored(something, who));
Self::deposit_event(Event::SomethingStored { something, who });
// Return a successful DispatchResultWithPostInfo
Ok(())
}