Skip to content

Commit

Permalink
simplify filestore new region setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Aug 14, 2023
1 parent b6a9ddf commit 1a934c0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions file_store/src/file_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ impl FileStore {
.map_err(DecodeError::from)?,
_ => None,
};
let region = if region.is_some() {
Region::new(region.unwrap())
} else {
Region::new(settings::default_region())
};
let region = Region::new(region.unwrap_or_else(settings::default_region));
let region_provider = RegionProviderChain::first_try(region).or_default_provider();

let mut config = aws_config::from_env().region(region_provider);
Expand Down

0 comments on commit 1a934c0

Please sign in to comment.