From 855e5e029e9324441f99c12d08be68e64a27410f Mon Sep 17 00:00:00 2001 From: Will Yang Date: Tue, 1 Oct 2024 14:26:24 -0700 Subject: [PATCH] clippy --- crates/sui-indexer/src/config.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/sui-indexer/src/config.rs b/crates/sui-indexer/src/config.rs index 52aa0a2c0f4df..a7c6efd0d8211 100644 --- a/crates/sui-indexer/src/config.rs +++ b/crates/sui-indexer/src/config.rs @@ -286,9 +286,7 @@ impl PruningOptions { /// If a path to the retention policies config has been provided, attempt to parse and return /// it. Otherwise, pruning is not enabled for the indexer, and return None. pub fn retention_policies(self) -> Option { - let Some(path) = self.config else { - return None; - }; + let path = self.config?; let contents = std::fs::read_to_string(&path).expect("Failed to read retention policies file"); @@ -303,7 +301,7 @@ impl PruningOptions { policies.overrides.values().all(|&retention| retention > 0), "All retention overrides must be greater than 0" ); - return Some(policies); + Some(policies) } }