Make decl_module not require a return type for functions (#1230)

If no return type is specified, `Result` is added and
`Ok(())` is returned by default.

Closes: #1182
This commit is contained in:
Bastian Köcher
2018-12-10 13:36:37 +01:00
committed by GitHub
parent 52ba9a5605
commit acf1b77bcd
17 changed files with 134 additions and 147 deletions
+1 -2
View File
@@ -189,10 +189,9 @@ decl_module! {
fn deposit_event() = default;
/// Report some misbehaviour.
fn report_misbehavior(origin, _report: Vec<u8>) -> Result {
fn report_misbehavior(origin, _report: Vec<u8>) {
ensure_signed(origin)?;
// TODO: https://github.com/paritytech/substrate/issues/1112
Ok(())
}
fn on_finalise(block_number: T::BlockNumber) {