Relax Send/Sync/Clone requirements for Pair (#14647)

* Relax Send/Sync requirements for not instanced generic Pair

* Remove leftover

* Apply review suggestion

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Further cleanup

* Trigger CI

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
This commit is contained in:
Davide Galassi
2023-07-27 12:28:56 +02:00
committed by GitHub
parent 99fc51ce3e
commit 91ba40380a
4 changed files with 30 additions and 32 deletions
+2 -2
View File
@@ -486,7 +486,7 @@ pub trait ByteArray: AsRef<[u8]> + AsMut<[u8]> + for<'a> TryFrom<&'a [u8], Error
}
/// Trait suitable for typical cryptographic key public type.
pub trait Public: ByteArray + Derive + CryptoType + PartialEq + Eq + Clone + Send + Sync {}
pub trait Public: CryptoType + ByteArray + Derive + PartialEq + Eq + Clone + Send {}
/// An opaque 32-byte cryptographic identifier.
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, TypeInfo)]
@@ -834,7 +834,7 @@ impl sp_std::str::FromStr for SecretUri {
///
/// For now it just specifies how to create a key from a phrase and derivation path.
#[cfg(feature = "full_crypto")]
pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
pub trait Pair: CryptoType + Sized {
/// The type which is used to encode a public key.
type Public: Public + Hash;