Skip to content

Commit

Permalink
dont assume default region
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Oct 13, 2023
1 parent a54ae27 commit c8a176c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/daft-io/src/s3_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,9 @@ impl S3LikeSource {
let mut new_config = self.s3_config.clone();
new_config.region_name = Some(region.to_string());

let creds_cache = if let Some(current_client) = w_handle.get(&self.default_region) {
Some(current_client.conf().credentials_cache())
} else {
None
};
let creds_cache = w_handle
.get(&self.default_region)
.map(|current_client| current_client.conf().credentials_cache());

let (_, new_client) = build_s3_client(&new_config, creds_cache).await?;

Expand Down

0 comments on commit c8a176c

Please sign in to comment.