mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-12 10:05:47 +00:00
Use Vec::with_capacity() to allocate new indices vector
This commit is contained in:
parent
b693e56ead
commit
8b8ece69cd
@ -62,7 +62,7 @@ impl Node {
|
|||||||
.skip(trim)
|
.skip(trim)
|
||||||
.map(|(a, b)| a ^ b)
|
.map(|(a, b)| a ^ b)
|
||||||
.collect();
|
.collect();
|
||||||
let mut indices = Vec::new();
|
let mut indices = Vec::with_capacity(a.indices.len() + b.indices.len());
|
||||||
if a.indices_before(b) {
|
if a.indices_before(b) {
|
||||||
indices.extend(a.indices.iter());
|
indices.extend(a.indices.iter());
|
||||||
indices.extend(b.indices.iter());
|
indices.extend(b.indices.iter());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user