Skip to content

Commit 892b275

Browse files
Sacha Lanskyark0f
authored andcommitted
Update template pallet to latest enum syntax (paritytech#12552)
1 parent cc8be97 commit 892b275

File tree

1 file changed

+2
-2
lines changed
  • bin/node-template/pallets/template/src

1 file changed

+2
-2
lines changed

bin/node-template/pallets/template/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub mod pallet {
4545
pub enum Event<T: Config> {
4646
/// Event documentation should end with an array that provides descriptive names for event
4747
/// parameters. [something, who]
48-
SomethingStored(u32, T::AccountId),
48+
SomethingStored { something: u32, who: T::AccountId },
4949
}
5050

5151
// Errors inform users that something went wrong.
@@ -75,7 +75,7 @@ pub mod pallet {
7575
<Something<T>>::put(something);
7676

7777
// Emit an event.
78-
Self::deposit_event(Event::SomethingStored(something, who));
78+
Self::deposit_event(Event::SomethingStored { something, who });
7979
// Return a successful DispatchResultWithPostInfo
8080
Ok(())
8181
}

0 commit comments

Comments
 (0)