Merge rust-bitcoin/rust-bitcoin#1949: key: Impl From<secp256k1::PublicKey> for bitcoin::PublicKey
ebcce38b4f
run cargo fmt (Andrew Poelstra)b3ac00b8b3
key: Impl From<secp256k1::PublicKey> for bitcoin::PublicKey (Steven Roose) Pull request description: ACKs for top commit: apoelstra: ACKebcce38b4f
tcharding: ACKebcce38b4f
Tree-SHA512: 9b862f0bb75e74780e935e5292c6a67ae479f699f0ee2f90515f972698dc06af5ea7d1725908fb435cafd6c0bab7263570d780607e507d6127efaea97f2464c8
This commit is contained in:
commit
f50bb05e99
|
@ -264,6 +264,10 @@ impl PublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<secp256k1::PublicKey> for PublicKey {
|
||||||
|
fn from(pk: secp256k1::PublicKey) -> PublicKey { PublicKey::new(pk) }
|
||||||
|
}
|
||||||
|
|
||||||
impl From<PublicKey> for XOnlyPublicKey {
|
impl From<PublicKey> for XOnlyPublicKey {
|
||||||
fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() }
|
fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue