From 6f5ca02ac979401388b257df773205b0dd55b123 Mon Sep 17 00:00:00 2001 From: Emilia Hane <58548332+emhane@users.noreply.github.com> Date: Fri, 13 Jan 2023 21:18:14 +0100 Subject: [PATCH] Improve syntax Co-authored-by: Michael Sproul --- beacon_node/store/src/hot_cold_store.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/beacon_node/store/src/hot_cold_store.rs b/beacon_node/store/src/hot_cold_store.rs index c54381b73..4d00b836a 100644 --- a/beacon_node/store/src/hot_cold_store.rs +++ b/beacon_node/store/src/hot_cold_store.rs @@ -1693,16 +1693,14 @@ impl, Cold: ItemStore> HotColdDB /// Try to prune blobs older than the data availability boundary. pub fn try_prune_blobs(&self, force: bool) -> Result<(), Error> { - let mut blob_info: BlobInfo; - - match self.get_blob_info() { + let blob_info = match self.get_blob_info() { Some(old_blob_info) => { - blob_info = old_blob_info; + old_blob_info } None => { return Ok(()); } - } + }; if blob_info.last_pruned_epoch == blob_info.next_epoch_to_prune && !force { info!(self.log, "Blobs sidecars are pruned");