Merge rust-bitcoin/rust-bitcoin#1901: key: Implement From<PublicKey> for XOnlyPublicKey
445aa84f8c
cargo fmt (Andrew Poelstra)d990084481
key: Implement From<PublicKey> for XOnlyPublicKey (Steven Roose) Pull request description: ACKs for top commit: tcharding: ACK445aa84f8c
apoelstra: ACK445aa84f8c
Tree-SHA512: c27b23dcf66139720011dc8bee379a8e4be642f8f60e8982c643013e163ad1610d355c6f5de04efc57d0dc11ba4ff0e893d3f760d5662d8f0c7eaba87f0a89a0
This commit is contained in:
commit
79bd294476
|
@ -253,6 +253,10 @@ impl PublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<PublicKey> for XOnlyPublicKey {
|
||||||
|
fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() }
|
||||||
|
}
|
||||||
|
|
||||||
/// An opaque return type for PublicKey::to_sort_key
|
/// An opaque return type for PublicKey::to_sort_key
|
||||||
#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
||||||
pub struct SortKey(u8, [u8; 32], [u8; 32]);
|
pub struct SortKey(u8, [u8; 32], [u8; 32]);
|
||||||
|
|
Loading…
Reference in New Issue