Skip to content

Commit 94dbd84

Browse files
committed
Move trait method
Clean up `MiniscriptKey` implementation for `bitcoin::PublicKey`. - Be uniform, put the trait method implementation below the associated types. - Trait methods have documentation on the trait, remove the unnecessary rustdoc on the implementation.
1 parent f250438 commit 94dbd84

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,12 @@ impl MiniscriptKey for bitcoin::secp256k1::PublicKey {
197197
}
198198

199199
impl MiniscriptKey for bitcoin::PublicKey {
200-
/// Returns the compressed-ness of the underlying secp256k1 key.
201-
fn is_uncompressed(&self) -> bool { !self.compressed }
202-
203200
type Sha256 = sha256::Hash;
204201
type Hash256 = hash256::Hash;
205202
type Ripemd160 = ripemd160::Hash;
206203
type Hash160 = hash160::Hash;
204+
205+
fn is_uncompressed(&self) -> bool { !self.compressed }
207206
}
208207

209208
impl MiniscriptKey for bitcoin::secp256k1::XOnlyPublicKey {

0 commit comments

Comments
 (0)