diff options
author | Alex Auvolat <alex@adnab.me> | 2023-08-31 11:45:19 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-08-31 11:45:19 +0200 |
commit | 4bdd73e974b0db12b3d0b93129309a547baff043 (patch) | |
tree | d50a4df3f75aba7d664a9987bc28f24dd7c648e0 /src/model/s3/lifecycle_worker.rs | |
parent | 1cdc321e28ccfbbe425365f3a03a526c3f456e3f (diff) | |
download | garage-4bdd73e974b0db12b3d0b93129309a547baff043.tar.gz garage-4bdd73e974b0db12b3d0b93129309a547baff043.zip |
lifecycle worker: correct small clippy lintsbucket-lifecycle
Diffstat (limited to 'src/model/s3/lifecycle_worker.rs')
-rw-r--r-- | src/model/s3/lifecycle_worker.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/s3/lifecycle_worker.rs b/src/model/s3/lifecycle_worker.rs index ed762413..928f2301 100644 --- a/src/model/s3/lifecycle_worker.rs +++ b/src/model/s3/lifecycle_worker.rs @@ -305,7 +305,7 @@ async fn process_object( (now_date - version_date) >= chrono::Duration::days(*n_days as i64) } LifecycleExpiration::AtDate(exp_date) => { - if let Ok(exp_date) = parse_lifecycle_date(&exp_date) { + if let Ok(exp_date) = parse_lifecycle_date(exp_date) { now_date >= exp_date } else { warn!("Invalid expiration date stored in bucket {:?} lifecycle config: {}", bucket.id, exp_date); @@ -391,7 +391,7 @@ fn check_size_filter(version_data: &ObjectVersionData, filter: &LifecycleFilter) return false; } } - return true; + true } fn midnight_ts(date: NaiveDate) -> u64 { |