Update to latest enum syntax (#382)
parent
7b32705707
commit
f0234dd79a
|
@ -45,7 +45,7 @@ pub mod pallet {
|
||||||
pub enum Event<T: Config> {
|
pub enum Event<T: Config> {
|
||||||
/// Event documentation should end with an array that provides descriptive names for event
|
/// Event documentation should end with an array that provides descriptive names for event
|
||||||
/// parameters. [something, who]
|
/// parameters. [something, who]
|
||||||
SomethingStored(u32, T::AccountId),
|
SomethingStored { something: u32, who: T::AccountId },
|
||||||
}
|
}
|
||||||
|
|
||||||
// Errors inform users that something went wrong.
|
// Errors inform users that something went wrong.
|
||||||
|
@ -75,7 +75,7 @@ pub mod pallet {
|
||||||
<Something<T>>::put(something);
|
<Something<T>>::put(something);
|
||||||
|
|
||||||
// Emit an event.
|
// Emit an event.
|
||||||
Self::deposit_event(Event::SomethingStored(something, who));
|
Self::deposit_event(Event::SomethingStored { something, who });
|
||||||
// Return a successful DispatchResultWithPostInfo
|
// Return a successful DispatchResultWithPostInfo
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue