Code formatting
simodels Build / Rustfmt (pull_request) Successful in 1m21s
simodels Build / Clippy (pull_request) Successful in 1m32s
simodels Build / Check (pull_request) Successful in 1m40s
simodels Build / Test Suite (pull_request) Successful in 1m42s
labyrinth release Tagging / release (pull_request) Successful in 2m25s
simodels Build / build (pull_request) Successful in 3m7s
simodels Build / Rustfmt (pull_request) Successful in 1m21s
simodels Build / Clippy (pull_request) Successful in 1m32s
simodels Build / Check (pull_request) Successful in 1m40s
simodels Build / Test Suite (pull_request) Successful in 1m42s
labyrinth release Tagging / release (pull_request) Successful in 2m25s
simodels Build / build (pull_request) Successful in 3m7s
This commit is contained in:
+13
-8
@@ -107,16 +107,21 @@ impl Labyrinth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Delete an object from the bucket
|
/// Delete an object from the bucket
|
||||||
pub async fn delete(&self, file_key: &str) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Error> {
|
pub async fn delete(
|
||||||
|
&self,
|
||||||
|
file_key: &str,
|
||||||
|
) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Error> {
|
||||||
let client = init_client(&self.config).await;
|
let client = init_client(&self.config).await;
|
||||||
|
|
||||||
match client.delete_object().bucket(self.config.bucket.clone()).key(file_key).send().await {
|
match client
|
||||||
Ok(response) => {
|
.delete_object()
|
||||||
Ok(response)
|
.bucket(self.config.bucket.clone())
|
||||||
}
|
.key(file_key)
|
||||||
Err(err) => {
|
.send()
|
||||||
Err(Error::Info(err.to_string()))
|
.await
|
||||||
}
|
{
|
||||||
|
Ok(response) => Ok(response),
|
||||||
|
Err(err) => Err(Error::Info(err.to_string())),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user