Update to latest enum syntax (#382)

main
Sacha Lansky 2022-11-17 17:17:29 +01:00 committed by GitHub
parent 7b32705707
commit f0234dd79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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(())
}