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:
@@ -427,7 +427,7 @@ struct TxRelay(Arc<BlockChainClient>);
|
||||
impl LightHandler for TxRelay {
|
||||
fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::UnverifiedTransaction]) {
|
||||
trace!(target: "pip", "Relaying {} transactions from peer {}", relay.len(), ctx.peer());
|
||||
self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), ctx.peer())
|
||||
self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).into_vec()).collect(), ctx.peer())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user