No need to clone the hyper::Client

The ownership behavior is straightforward and more clear when not
cloning arbitrary handles.
This commit is contained in:
Glenn Griffin
2019-11-08 13:50:41 -08:00
parent 916aaa84e9
commit a0c73d6087
2 changed files with 5 additions and 5 deletions

View File

@@ -199,7 +199,7 @@ where
let scope_key = hash_scopes(scopes);
let store = &self.store;
let delegate = &self.delegate;
let client = self.client.clone();
let client = &self.client;
let appsecret = self.inner.application_secret();
let gettoken = self.inner.clone();
loop {
@@ -214,7 +214,7 @@ where
// Implement refresh flow.
let refresh_token = t.refresh_token.clone();
let rr = RefreshFlow::refresh_token(
client.clone(),
client,
appsecret,
refresh_token.unwrap(),
)