aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_delete.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-04-23 22:18:00 +0200
committerAlex Auvolat <alex@adnab.me>2021-05-03 22:11:41 +0200
commit84856e84e5c7ccbb6cb32582c1ef71acc83396f5 (patch)
treec40ba4a3ba74d24941748c50026c43929938e1b1 /src/api/s3_delete.rs
parent4a1e079e8fe2c17078a274ef17c8d63e9b1bb96e (diff)
downloadgarage-84856e84e5c7ccbb6cb32582c1ef71acc83396f5.tar.gz
garage-84856e84e5c7ccbb6cb32582c1ef71acc83396f5.zip
fix clippy warnings on api
Diffstat (limited to 'src/api/s3_delete.rs')
-rw-r--r--src/api/s3_delete.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/api/s3_delete.rs b/src/api/s3_delete.rs
index 05387403..85bb7692 100644
--- a/src/api/s3_delete.rs
+++ b/src/api/s3_delete.rs
@@ -24,10 +24,12 @@ async fn handle_delete_internal(
.await?
.ok_or(Error::NotFound)?; // No need to delete
- let interesting_versions = object.versions().iter().filter(|v| match v.state {
- ObjectVersionState::Aborted => false,
- ObjectVersionState::Complete(ObjectVersionData::DeleteMarker) => false,
- _ => true,
+ let interesting_versions = object.versions().iter().filter(|v| {
+ !matches!(
+ v.state,
+ ObjectVersionState::Aborted
+ | ObjectVersionState::Complete(ObjectVersionData::DeleteMarker)
+ )
});
let mut version_to_delete = None;