[pallet-message-queue] Implement impl_trait_for_tuples for QueuePausedQuery (#2227)

These changes are required so that the bridgehub system runtimes can
more easily be configured with multiple message processors

Example usage:

```rust
use frame_support::traits::QueuePausedQuery;

impl pallet_message_queue::Config for Runtime {
    type QueuePausedQuery = (A, B, C)
}
This commit is contained in:
Vincent Geddes
2023-11-10 15:12:47 +02:00
committed by GitHub
parent 64effd0e6f
commit 3f0383a5b8
@@ -240,8 +240,14 @@ pub trait QueuePausedQuery<Origin> {
fn is_paused(origin: &Origin) -> bool;
}
impl<Origin> QueuePausedQuery<Origin> for () {
fn is_paused(_: &Origin) -> bool {
#[impl_trait_for_tuples::impl_for_tuples(8)]
impl<Origin> QueuePausedQuery<Origin> for Tuple {
fn is_paused(origin: &Origin) -> bool {
for_tuples!( #(
if Tuple::is_paused(origin) {
return true;
}
)* );
false
}
}