Skip to content

Commit 0c7a972

Browse files
committed
Remove whitespace fro ToPublicKey impls
Remove whitspace in `ToPubliKey` trait implementations with no loss of clarity because the functions all return `*hash`.
1 parent 2fadccc commit 0c7a972

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,23 +259,17 @@ impl ToPublicKey for bitcoin::PublicKey {
259259
fn to_public_key(&self) -> bitcoin::PublicKey { *self }
260260

261261
fn to_sha256(hash: &sha256::Hash) -> sha256::Hash { *hash }
262-
263262
fn to_hash256(hash: &hash256::Hash) -> hash256::Hash { *hash }
264-
265263
fn to_ripemd160(hash: &ripemd160::Hash) -> ripemd160::Hash { *hash }
266-
267264
fn to_hash160(hash: &hash160::Hash) -> hash160::Hash { *hash }
268265
}
269266

270267
impl ToPublicKey for bitcoin::secp256k1::PublicKey {
271268
fn to_public_key(&self) -> bitcoin::PublicKey { bitcoin::PublicKey::new(*self) }
272269

273270
fn to_sha256(hash: &sha256::Hash) -> sha256::Hash { *hash }
274-
275271
fn to_hash256(hash: &hash256::Hash) -> hash256::Hash { *hash }
276-
277272
fn to_ripemd160(hash: &ripemd160::Hash) -> ripemd160::Hash { *hash }
278-
279273
fn to_hash160(hash: &hash160::Hash) -> hash160::Hash { *hash }
280274
}
281275

@@ -292,11 +286,8 @@ impl ToPublicKey for bitcoin::secp256k1::XOnlyPublicKey {
292286
fn to_x_only_pubkey(&self) -> bitcoin::secp256k1::XOnlyPublicKey { *self }
293287

294288
fn to_sha256(hash: &sha256::Hash) -> sha256::Hash { *hash }
295-
296289
fn to_hash256(hash: &hash256::Hash) -> hash256::Hash { *hash }
297-
298290
fn to_ripemd160(hash: &ripemd160::Hash) -> ripemd160::Hash { *hash }
299-
300291
fn to_hash160(hash: &hash160::Hash) -> hash160::Hash { *hash }
301292
}
302293

0 commit comments

Comments
 (0)