aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_delete.rs
diff options
context:
space:
mode:
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;