Skip to content

Commit 263d1e8

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 0197c3e commit 263d1e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,12 @@ impl MiniscriptKey for bitcoin::secp256k1::PublicKey {
192192
}
193193

194194
impl MiniscriptKey for bitcoin::PublicKey {
195-
/// Returns the compressed-ness of the underlying secp256k1 key.
196-
fn is_uncompressed(&self) -> bool { !self.compressed }
197-
198195
type Sha256 = sha256::Hash;
199196
type Hash256 = hash256::Hash;
200197
type Ripemd160 = ripemd160::Hash;
201198
type Hash160 = hash160::Hash;
199+
200+
fn is_uncompressed(&self) -> bool { !self.compressed }
202201
}
203202

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

0 commit comments

Comments
 (0)