Author: Jason White [jwhite@esri.com]
Hash: 23848d798522d832a18848437775f5afb8a06527
Timestamp: Mon, 06 May 2019 18:19:09 +0000 (5 years ago)

+3 -1 +/-1 browse
Use fancy syntax for struct initialization
1diff --git a/src/storage/s3.rs b/src/storage/s3.rs
2index 38ff3a0..e0f6fb8 100644
3--- a/src/storage/s3.rs
4+++ b/src/storage/s3.rs
5 @@ -95,15 +95,17 @@ impl Backend {
6 while prefix.ends_with('/') {
7 prefix.pop();
8 }
9+
10 // `Region::default` will get try to get the region from the environment
11 // and fallback to a default if it isn't found.
12 let mut region = Region::default();
13 if let Ok(endpoint) = std::env::var("AWS_S3_ENDPOINT") {
14 region = Region::Custom {
15 name: region.name().to_owned(),
16- endpoint: endpoint,
17+ endpoint,
18 }
19 }
20+
21 Backend::with_client(S3Client::new(region), bucket, prefix)
22 }
23 }