Skip to content

Commit c8ea819

Browse files
committed
Remove unnecessary cast
Remove build error: error: casting integer literal to `u8` is unnecessary
1 parent 15ddc86 commit c8ea819

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bitcoind-tests/tests/setup/test_util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ impl TestData {
9999
// generate a fixed data for n keys
100100
pub(crate) fn new_fixed_data(n: usize) -> Self {
101101
let (sks, pks, x_only_keypairs, x_only_pks) = setup_keys(n);
102-
let sha256_pre = [0x12 as u8; 32];
102+
let sha256_pre = [0x12_u8; 32];
103103
let sha256 = sha256::Hash::hash(&sha256_pre);
104-
let hash256_pre = [0x34 as u8; 32];
104+
let hash256_pre = [0x34_u8; 32];
105105
let hash256 = hash256::Hash::hash(&hash256_pre);
106-
let hash160_pre = [0x56 as u8; 32];
106+
let hash160_pre = [0x56_u8; 32];
107107
let hash160 = hash160::Hash::hash(&hash160_pre);
108-
let ripemd160_pre = [0x78 as u8; 32];
108+
let ripemd160_pre = [0x78_u8; 32];
109109
let ripemd160 = ripemd160::Hash::hash(&ripemd160_pre);
110110

111111
let pubdata = PubData { pks, sha256, hash256, ripemd160, hash160, x_only_pks };

0 commit comments

Comments
 (0)