fix(compilation warnings) (#10649)

This commit is contained in:
Niklas Adolfsson
2019-05-13 15:10:25 +02:00
committed by GitHub
parent 42268fd1ef
commit 87699f8de0
7 changed files with 11 additions and 12 deletions

View File

@@ -287,8 +287,7 @@ impl Clique {
"Back-filling block state. last_checkpoint_number: {}, target: {}({}).",
last_checkpoint_number, header.number(), header.hash());
let mut chain: &mut VecDeque<Header> = &mut VecDeque::with_capacity(
(header.number() - last_checkpoint_number + 1) as usize);
let mut chain = VecDeque::with_capacity((header.number() - last_checkpoint_number + 1) as usize);
// Put ourselves in.
chain.push_front(header.clone());
@@ -332,7 +331,7 @@ impl Clique {
// Backfill!
let mut new_state = last_checkpoint_state.clone();
for item in chain {
for item in &chain {
new_state.apply(item, false)?;
}
new_state.calc_next_timestamp(header.timestamp(), self.period)?;