Fix build warning about public_from_secret_hex.

This commit is contained in:
Arik Sosman 2023-06-23 22:33:55 -07:00
parent d327c231cf
commit 4a56d87ef9
No known key found for this signature in database
GPG key ID: F4FB5A3366C4D92E

View file

@ -7405,7 +7405,7 @@ mod tests {
} }
} }
#[cfg(not(feature = "grind_signatures"))] #[cfg(all(feature = "_test_vectors", not(feature = "grind_signatures")))]
fn public_from_secret_hex(secp_ctx: &Secp256k1<bitcoin::secp256k1::All>, hex: &str) -> PublicKey { fn public_from_secret_hex(secp_ctx: &Secp256k1<bitcoin::secp256k1::All>, hex: &str) -> PublicKey {
PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&hex::decode(hex).unwrap()[..]).unwrap()) PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&hex::decode(hex).unwrap()[..]).unwrap())
} }