Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement GetDispatchInfo for () #9494

Merged
merged 4 commits into from
Aug 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions frame/support/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ pub trait GetDispatchInfo {
fn get_dispatch_info(&self) -> DispatchInfo;
}

impl GetDispatchInfo for () {
fn get_dispatch_info(&self) -> DispatchInfo {
DispatchInfo::default()
}
}

/// Weight information that is only available post dispatch.
/// NOTE: This can only be used to reduce the weight or fee, not increase it.
#[derive(Clone, Copy, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)]
Expand Down