diff --git a/src/common/s3.rs b/src/common/s3.rs index d8e610874f4bd..7c7a9810b1850 100644 --- a/src/common/s3.rs +++ b/src/common/s3.rs @@ -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()) } }