Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Oct 1, 2024
1 parent 199532b commit 855e5e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/sui-indexer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RetentionPolicies> {
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");
Expand All @@ -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)
}
}

Expand Down

0 comments on commit 855e5e0

Please sign in to comment.