stops consuming pinned vectors with a recycler (#16441)

If the vector is pinned and has a recycler, From<PinnedVec>
implementation of Vec should clone (instead of consuming) the underlying
vector so that the next allocation of a PinnedVec will recycle an
already pinned one.
This commit is contained in:
behzad nouri
2021-04-09 16:55:24 +00:00
committed by GitHub
parent 8ec7e2e14f
commit 22a18a68e3
4 changed files with 11 additions and 22 deletions

View File

@ -283,9 +283,9 @@ impl EntryVerificationState {
.zip(entries)
.all(|((hash, tx_hash), answer)| {
if answer.num_hashes == 0 {
hash == answer.hash
*hash == answer.hash
} else {
let mut poh = Poh::new(hash, None);
let mut poh = Poh::new(*hash, None);
if let Some(mixin) = tx_hash {
poh.record(*mixin).unwrap().hash == answer.hash
} else {