diff --git a/frame/support/src/traits/members.rs b/frame/support/src/traits/members.rs index 125f096fa92e1..8b9c2c90f541d 100644 --- a/frame/support/src/traits/members.rs +++ b/frame/support/src/traits/members.rs @@ -27,10 +27,20 @@ pub trait Contains { /// A `Contains` implementation which always returns `true`. pub struct All(PhantomData); -impl Contains for All { +impl Contains for All { fn contains(_: &T) -> bool { true } } +#[impl_trait_for_tuples::impl_for_tuples(30)] +impl Contains for Tuple { + fn contains(t: &T) -> bool { + for_tuples!( #( + if Tuple::contains(t) { return true } + )* ); + false + } +} + /// Create a type which implements the `Contains` trait for a particular type with syntax similar /// to `matches!`. #[macro_export]