Skip to content

Commit cc0ce79

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 cb1344d commit cc0ce79

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
@@ -183,13 +183,12 @@ impl MiniscriptKey for bitcoin::secp256k1::PublicKey {
183183
}
184184

185185
impl MiniscriptKey for bitcoin::PublicKey {
186-
/// Returns the compressed-ness of the underlying secp256k1 key.
187-
fn is_uncompressed(&self) -> bool { !self.compressed }
188-
189186
type Sha256 = sha256::Hash;
190187
type Hash256 = hash256::Hash;
191188
type Ripemd160 = ripemd160::Hash;
192189
type Hash160 = hash160::Hash;
190+
191+
fn is_uncompressed(&self) -> bool { !self.compressed }
193192
}
194193

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

0 commit comments

Comments
 (0)