Upgrade elastic-array to 0.9.0
This is a huge change, which includes some changes to replace code that originally cloned to reuse allocations instead. The updated `elastic-array` crate renames its consuming `Vec`-conversion method to `into_vec`, which means that I can do a simple `sed -i 's/to_vec/into_vec/'` and then fix the compilation errors. This commit is probably a minor performance win and definitely a significant readability win.
This commit is contained in:
@@ -338,7 +338,7 @@ mod tests {
|
||||
|
||||
fn block_header_data(&self, hash: &H256) -> Option<encoded::Header> {
|
||||
self.block(hash)
|
||||
.map(|b| b.header_view().rlp().as_raw().to_vec())
|
||||
.map(|b| b.header_view().rlp().as_raw().into_vec())
|
||||
.map(encoded::Header::new)
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ mod tests {
|
||||
let mut uncles_rlp = RlpStream::new();
|
||||
uncles_rlp.append_list(&good_uncles);
|
||||
let good_uncles_hash = uncles_rlp.as_raw().sha3();
|
||||
let good_transactions_root = ordered_trie_root(good_transactions.iter().map(|t| ::rlp::encode::<UnverifiedTransaction>(t).to_vec()));
|
||||
let good_transactions_root = ordered_trie_root(good_transactions.iter().map(|t| ::rlp::encode::<UnverifiedTransaction>(t).into_vec()));
|
||||
|
||||
let mut parent = good.clone();
|
||||
parent.set_number(9);
|
||||
|
||||
Reference in New Issue
Block a user