Add `Signers` impls for `Arc<dyn Signer>` (#27000)

* Add `Signers` impls for `Arc<dyn Signer>`

* Reformat
This commit is contained in:
Justin Malčić 2022-08-09 12:05:59 +01:00 committed by GitHub
parent ecda3bec01
commit 632752d2f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 3 deletions

View File

@ -1,7 +1,11 @@
#![cfg(feature = "full")]
use crate::{
pubkey::Pubkey,
signature::{Signature, Signer, SignerError},
use {
crate::{
pubkey::Pubkey,
signature::{Signature, Signer, SignerError},
},
std::sync::Arc,
};
/// Convenience trait for working with mixed collections of `Signer`s
@ -59,6 +63,14 @@ impl Signers for Vec<Box<dyn Signer>> {
default_keypairs_impl!();
}
impl Signers for [Arc<dyn Signer>] {
default_keypairs_impl!();
}
impl Signers for Vec<Arc<dyn Signer>> {
default_keypairs_impl!();
}
impl Signers for Vec<&dyn Signer> {
default_keypairs_impl!();
}