diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-23 22:18:00 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-05-03 22:11:41 +0200 |
commit | 84856e84e5c7ccbb6cb32582c1ef71acc83396f5 (patch) | |
tree | c40ba4a3ba74d24941748c50026c43929938e1b1 /src/api/s3_delete.rs | |
parent | 4a1e079e8fe2c17078a274ef17c8d63e9b1bb96e (diff) | |
download | garage-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.rs | 10 |
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; |