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

Commit

Permalink
match
Browse files Browse the repository at this point in the history
  • Loading branch information
gui1117 committed Oct 6, 2021
1 parent f9ed7b8 commit 84a9ac0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ pub fn expand_outer_origin(
}

fn filter_call(&self, call: &Self::Call) -> bool {
// Root bypasses all filters
matches!(self.caller, OriginCaller::system(#system_path::Origin::<#runtime>::Root))
|| (self.filter)(call)
match self.caller {
// Root bypasses all filters
OriginCaller::system(#system_path::Origin::<#runtime>::Root) => true,
_ => (self.filter)(call),
}
}

fn caller(&self) -> &Self::PalletsOrigin {
Expand Down

0 comments on commit 84a9ac0

Please sign in to comment.