Remove Filter and use Contains instead (#9514)

* Remove Filter and use Contains instead

* Fixes

* Formatting

* Update docs/Upgrading-2.0-to-3.0.md

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Typo

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2021-08-07 19:26:40 +00:00
1 parent e251d1cedb
commit bdda3ed612
79 files changed
+199 -199

No files matched your search

+4 -3
View File
@@ -24,7 +24,8 @@ use super::*;
use crate as proxy;
use codec::{Decode, Encode};
use frame_support::{
assert_noop, assert_ok, dispatch::DispatchError, parameter_types, traits::Filter, RuntimeDebug,
assert_noop, assert_ok, dispatch::DispatchError, parameter_types, traits::Contains,
RuntimeDebug,
};
use sp_core::H256;
use sp_runtime::{
@@ -132,8 +133,8 @@ impl InstanceFilter<Call> for ProxyType {
}
}
pub struct BaseFilter;
impl Filter<Call> for BaseFilter {
fn filter(c: &Call) -> bool {
impl Contains<Call> for BaseFilter {
fn contains(c: &Call) -> bool {
match *c {
// Remark is used as a no-op call in the benchmarking
Call::System(SystemCall::remark(_)) => true,