diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-19 14:33:49 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-19 14:33:49 +0200 |
commit | 6be90936a108d971e0cfa3ddaa9c2d54557e30f3 (patch) | |
tree | ed0dae1b4ebf3215b808b81d9980376e9b5dee26 /src/bayou.rs | |
parent | 1ac56a91981bee4867dfb054bd2199c6111fe1eb (diff) | |
download | aerogramme-6be90936a108d971e0cfa3ddaa9c2d54557e30f3.tar.gz aerogramme-6be90936a108d971e0cfa3ddaa9c2d54557e30f3.zip |
Some refactoring
Diffstat (limited to 'src/bayou.rs')
-rw-r--r-- | src/bayou.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bayou.rs b/src/bayou.rs index 97281cd..acca1e5 100644 --- a/src/bayou.rs +++ b/src/bayou.rs @@ -57,18 +57,16 @@ pub struct Bayou<S: BayouState> { impl<S: BayouState> Bayou<S> { pub fn new( - k2v_region: &Region, - s3_region: &Region, creds: &Credentials, path: String, ) -> Result<Self> { - let k2v_client = creds.k2v_client(k2v_region)?; - let s3_client = creds.s3_client(s3_region)?; + let k2v_client = creds.k2v_client()?; + let s3_client = creds.s3_client()?; Ok(Self { - bucket: creds.bucket.clone(), + bucket: creds.bucket().to_string(), path, - key: creds.master_key.clone(), + key: creds.keys.master.clone(), k2v: k2v_client, s3: s3_client, checkpoint: (Timestamp::zero(), S::default()), |