From 6be90936a108d971e0cfa3ddaa9c2d54557e30f3 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 19 May 2022 14:33:49 +0200 Subject: Some refactoring --- src/bayou.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/bayou.rs') 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 { impl Bayou { pub fn new( - k2v_region: &Region, - s3_region: &Region, creds: &Credentials, path: String, ) -> Result { - 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()), -- cgit v1.2.3