From f0234dd79ac796085bef649d43e95d4b617ffdfd Mon Sep 17 00:00:00 2001 From: Sacha Lansky Date: Thu, 17 Nov 2022 17:17:29 +0100 Subject: [PATCH] Update to latest enum syntax (#382) --- pallets/template/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/template/src/lib.rs b/pallets/template/src/lib.rs index 0b55d7a..28d36ac 100644 --- a/pallets/template/src/lib.rs +++ b/pallets/template/src/lib.rs @@ -45,7 +45,7 @@ pub mod pallet { pub enum Event { /// 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 { >::put(something); // Emit an event. - Self::deposit_event(Event::SomethingStored(something, who)); + Self::deposit_event(Event::SomethingStored { something, who }); // Return a successful DispatchResultWithPostInfo Ok(()) }