From 749cc1fd34aeb738ed2e73806cb6b85869f3179e Mon Sep 17 00:00:00 2001 From: chenwei Date: Mon, 29 Jun 2020 02:17:15 +0800 Subject: [PATCH] Implement `()` for `Happened` (#6529) --- substrate/frame/support/src/traits.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/substrate/frame/support/src/traits.rs b/substrate/frame/support/src/traits.rs index f25ff67efb..b36559c363 100644 --- a/substrate/frame/support/src/traits.rs +++ b/substrate/frame/support/src/traits.rs @@ -329,6 +329,10 @@ pub trait Happened { fn happened(t: &T); } +impl Happened for () { + fn happened(_: &T) {} +} + /// A shim for placing around a storage item in order to use it as a `StoredValue`. Ideally this /// wouldn't be needed as `StorageValue`s should blanket implement `StoredValue`s, however this /// would break the ability to have custom impls of `StoredValue`. The other workaround is to