Remove superflous Pair::verify_weak (#13972)

This commit is contained in:
Davide Galassi
2023-04-21 22:32:32 +02:00
committed by GitHub
parent 58f5cd6adb
commit b8d94bfad1
5 changed files with 15 additions and 69 deletions
-15
View File
@@ -716,10 +716,6 @@ mod dummy {
true
}
fn verify_weak<P: AsRef<[u8]>, M: AsRef<[u8]>>(_: &[u8], _: M, _: P) -> bool {
true
}
fn public(&self) -> Self::Public {
Self
}
@@ -917,9 +913,6 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
/// Verify a signature on a message. Returns true if the signature is good.
fn verify<M: AsRef<[u8]>>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool;
/// Verify a signature on a message. Returns true if the signature is good.
fn verify_weak<P: AsRef<[u8]>, M: AsRef<[u8]>>(sig: &[u8], message: M, pubkey: P) -> bool;
/// Get the public key.
fn public(&self) -> Self::Public;
@@ -1272,14 +1265,6 @@ mod tests {
true
}
fn verify_weak<P: AsRef<[u8]>, M: AsRef<[u8]>>(
_sig: &[u8],
_message: M,
_pubkey: P,
) -> bool {
true
}
fn public(&self) -> Self::Public {
TestPublic
}