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:
@@ -177,7 +177,7 @@ mod tests {
|
||||
|
||||
parent_hash = Some(header.hash());
|
||||
|
||||
encoded::Header::new(::rlp::encode(&header).to_vec())
|
||||
encoded::Header::new(::rlp::encode(&header).into_vec())
|
||||
}).collect();
|
||||
|
||||
assert!(verify(&headers, &request).is_ok());
|
||||
@@ -203,7 +203,7 @@ mod tests {
|
||||
|
||||
parent_hash = Some(header.hash());
|
||||
|
||||
encoded::Header::new(::rlp::encode(&header).to_vec())
|
||||
encoded::Header::new(::rlp::encode(&header).into_vec())
|
||||
}).collect();
|
||||
|
||||
assert!(verify(&headers, &request).is_ok());
|
||||
@@ -229,7 +229,7 @@ mod tests {
|
||||
|
||||
parent_hash = Some(header.hash());
|
||||
|
||||
encoded::Header::new(::rlp::encode(&header).to_vec())
|
||||
encoded::Header::new(::rlp::encode(&header).into_vec())
|
||||
}).collect();
|
||||
|
||||
assert_eq!(verify(&headers, &request), Err(BasicError::TooManyHeaders(20, 25)));
|
||||
@@ -248,7 +248,7 @@ mod tests {
|
||||
let mut header = Header::default();
|
||||
header.set_number(x);
|
||||
|
||||
encoded::Header::new(::rlp::encode(&header).to_vec())
|
||||
encoded::Header::new(::rlp::encode(&header).into_vec())
|
||||
}).collect();
|
||||
|
||||
assert_eq!(verify(&headers, &request), Err(BasicError::WrongSkip(5, Some(2))));
|
||||
|
||||
Reference in New Issue
Block a user