Fix formatting (#1154)

This commit is contained in:
Age Manning 2020-05-18 14:04:14 +10:00 committed by GitHub
parent ed2f0b797c
commit 4995427884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ impl ExitCache {
spec: &ChainSpec, spec: &ChainSpec,
) -> Result<(), BeaconStateError> { ) -> Result<(), BeaconStateError> {
if self.initialized { if self.initialized {
return Ok(()) return Ok(());
} }
self.initialized = true; self.initialized = true;
@ -57,7 +57,11 @@ impl ExitCache {
/// Get number of validators with the given exit epoch. (Return 0 for the default exit epoch.) /// Get number of validators with the given exit epoch. (Return 0 for the default exit epoch.)
pub fn get_churn_at(&self, exit_epoch: Epoch) -> Result<u64, BeaconStateError> { pub fn get_churn_at(&self, exit_epoch: Epoch) -> Result<u64, BeaconStateError> {
self.check_initialized()?; self.check_initialized()?;
Ok(self.exit_epoch_counts.get(&exit_epoch).cloned().unwrap_or(0)) Ok(self
.exit_epoch_counts
.get(&exit_epoch)
.cloned()
.unwrap_or(0))
} }
} }