mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Add various fixes to clippy lints
Thou shalt appease clippy
This commit is contained in:
@@ -216,9 +216,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.iter()
|
||||
.map(|root| match self.get_block(root)? {
|
||||
Some(block) => Ok(block.body),
|
||||
None => Err(Error::DBInconsistent(
|
||||
format!("Missing block: {}", root).into(),
|
||||
)),
|
||||
None => Err(Error::DBInconsistent(format!("Missing block: {}", root))),
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ impl<T: EthSpec, U: Store> Iterator for BlockRootsIterator<T, U> {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.slot = self.slot - 1;
|
||||
self.slot -= 1;
|
||||
|
||||
match self.beacon_state.get_block_root(self.slot) {
|
||||
Ok(root) => Some(*root),
|
||||
@@ -73,7 +73,7 @@ impl<T: EthSpec, U: Store> Iterator for BlockRootsIterator<T, U> {
|
||||
|
||||
self.beacon_state.get_block_root(self.slot).ok().cloned()
|
||||
}
|
||||
_ => return None,
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user