Skip to content

Commit

Permalink
Add Signers impls for Arc<dyn Signer> (solana-labs#27000)
Browse files Browse the repository at this point in the history
* Add `Signers` impls for `Arc<dyn Signer>`

* Reformat
  • Loading branch information
jmalcic authored and xiangzhu70 committed Aug 17, 2022
1 parent 60a4ac9 commit cc36af0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions sdk/src/signer/signers.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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!();
}
Expand Down

0 comments on commit cc36af0

Please sign in to comment.