mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: use Vec::with_capacity and reserve_exact (#11904)
This commit is contained in:
@ -505,7 +505,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn compact_address() {
|
||||
let mut buf = vec![];
|
||||
let mut buf = Vec::with_capacity(21);
|
||||
assert_eq!(Address::ZERO.to_compact(&mut buf), 20);
|
||||
assert_eq!(buf, vec![0; 20]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user