mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 20:57:59 +00:00
Simplify deposit_event declaration in decl_module (#3506)
* simplify module deposit_event declaration * fix * bump version * fix * fix test * fix doc
This commit is contained in:
committed by
Bastian Köcher
parent
f830db9642
commit
b07fd450e2
@@ -12,8 +12,11 @@ pub trait Trait: 'static + Eq + Clone {
|
||||
|
||||
srml_support::decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
pub fn deposit_event(_event: T::Event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait> Module<T> {
|
||||
pub fn deposit_event(_event: impl Into<T::Event>) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +52,4 @@ pub fn ensure_root<OuterOrigin, AccountId>(o: OuterOrigin) -> Result<(), &'stati
|
||||
where OuterOrigin: Into<Result<RawOrigin<AccountId>, OuterOrigin>>
|
||||
{
|
||||
o.into().map(|_| ()).map_err(|_| "bad origin: expected to be a root origin")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user