Skip to content

Commit 22b4331

Browse files
authored
perf: optimize Vec creation in bip152 tests
1 parent af39c02 commit 22b4331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin/src/bip152.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ mod test {
544544
for testcase in testcases {
545545
{
546546
// test deserialization
547-
let mut raw: Vec<u8> = [0u8; 32].to_vec();
547+
let mut raw: Vec<u8> = vec![0u8; 32];
548548
raw.extend(testcase.0.clone());
549549
let btr: BlockTransactionsRequest = deserialize(&raw.to_vec()).unwrap();
550550
assert_eq!(testcase.1, btr.indexes);

0 commit comments

Comments
 (0)