async fn try_delete(&self, key: String) -> anyhow::Result<()> {
        if let Some(client) = self.client.as_ref() {
            client
                .delete_object(DeleteObjectRequest {
                    key,
                    bucket: self.bucket.clone(),
                    ..DeleteObjectRequest::default()
                })
                .await
                .context("failed to delete object from s3")?;
        }

        Ok(())
    }
// note: does nothing if object doesn't exist, or if the client is disabled.
does nothing if object doesn't exist, or if the client is disabled.
does nothing if object doesn ' t exist or if the client is disabled .
async fn try_delete(&self, key: String) -> anyhow::Result<()> {
        if let Some(client) = self.client.as_ref() {
            client
                .delete_object(DeleteObjectRequest {
                    key,
                    bucket: self.bucket.clone(),
                    ..DeleteObjectRequest::default()
                })
                .await
                .context("failed to delete object from s3")?;
        }
        Ok(())
    }
async fn try_delete ( & self , key : String ) -> anyhow :: Result < ( ) > { if let Some ( client ) = self . client . as_ref ( ) { client . delete_object ( DeleteObjectRequest { key , bucket : self . bucket . clone ( ) , .. DeleteObjectRequest :: default ( ) } ) . await . context ( " " ) ? ; } Ok ( ( ) ) }
note: does nothing if object doesn't exist, or if the client is disabled.
note : does nothing if object doesn ' t exist or if the client is disabled .
&self
key
String