Update rust-s3 dependency and move Cargo.toml dependencies

This commit is contained in:
Alex Auvolat
2023-05-12 12:12:32 +02:00
parent 30a3cec87e
commit 10e06737cf
6 changed files with 120 additions and 110 deletions
+5 -3
View File
@@ -392,13 +392,15 @@ impl S3Config {
secret_key: Some(self.access_key_secret.clone()),
security_token: None,
session_token: None,
expiration: None,
};
let bucket = Bucket::new(&self.bucket, region, credentials).unwrap();
if self.path_style {
Bucket::new_with_path_style(&self.bucket, region, credentials)
bucket.with_path_style()
} else {
Bucket::new(&self.bucket, region, credentials)
}.unwrap()
bucket
}
}
}
+6 -4
View File
@@ -69,7 +69,8 @@ pub enum Error {
Webfinger,
Expired,
UserAlreadyExists,
Anyhow(anyhow::Error),
#[cfg(feature = "s3")]
S3(s3::error::S3Error),
}
impl From<bcrypt::BcryptError> for Error {
@@ -171,9 +172,10 @@ impl From<request::Error> for Error {
}
}
impl From<anyhow::Error> for Error {
fn from(err: anyhow::Error) -> Error {
Error::Anyhow(err)
#[cfg(feature = "s3")]
impl From<s3::error::S3Error> for Error {
fn from(err: s3::error::S3Error) -> Error {
Error::S3(err)
}
}