From fb75bca530f0c92672b58142f822ac8b4373967c Mon Sep 17 00:00:00 2001 From: librelois <c@elo.tf> Date: Sun, 16 Jan 2022 18:55:08 +0100 Subject: [PATCH] clippy --- runtime/g1/src/lib.rs | 6 +----- runtime/gdev/src/lib.rs | 5 +---- runtime/gtest/src/lib.rs | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index b654b9e98..18e569aba 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -143,11 +143,7 @@ pub type Executive = frame_executive::Executive< pub struct BaseCallFilter; impl frame_support::traits::Contains<Call> for BaseCallFilter { fn contains(call: &Call) -> bool { - match call { - Call::Membership(_) => false, - Call::Session(_) => false, - _ => true, - } + matches!(call, Call::Membership(_) | Call::Session(_)) } } diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index 08bccd52b..18a47fe2d 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -135,10 +135,7 @@ pub type Executive = frame_executive::Executive< pub struct BaseCallFilter; impl frame_support::traits::Contains<Call> for BaseCallFilter { fn contains(call: &Call) -> bool { - match call { - Call::Membership(_) => false, - _ => true, - } + matches!(call, Call::Membership(_)) } } diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index b1ab558f5..4a9900a69 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -143,11 +143,7 @@ pub type Executive = frame_executive::Executive< pub struct BaseCallFilter; impl frame_support::traits::Contains<Call> for BaseCallFilter { fn contains(call: &Call) -> bool { - match call { - Call::Membership(_) => false, - Call::Session(_) => false, - _ => true, - } + matches!(call, Call::Membership(_) | Call::Session(_)) } } -- GitLab