mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
[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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user