Skip to content

Commit

Permalink
fix(aws_s3 sink): simplify S3ClientBuilder logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sam6258 committed Dec 19, 2024
1 parent 337b667 commit a0ac4a0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/common/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ impl ClientBuilder for S3ClientBuilder {
type Client = aws_sdk_s3::client::Client;

fn build(&self, config: &aws_types::SdkConfig) -> Self::Client {
let mut builder = config::Builder::from(config);

if let Some(true) = self.force_path_style {
builder = builder.force_path_style(true);
}

let builder =
config::Builder::from(config).force_path_style(self.force_path_style.unwrap_or(true));
aws_sdk_s3::client::Client::from_conf(builder.build())
}
}

0 comments on commit a0ac4a0

Please sign in to comment.