Remove instances of cloning ApplicationSecret

ApplicationSecret is not a small struct. This removes the instances
where it's cloned in favor of passing a shared reference.
This commit is contained in:
Glenn Griffin
2019-11-08 13:40:34 -08:00
parent 696577aa01
commit 9542e3a9f1
7 changed files with 73 additions and 58 deletions

View File

@@ -216,7 +216,7 @@ where
let store = store.clone();
let rr = RefreshFlow::refresh_token(
client.clone(),
appsecret.clone(),
appsecret,
refresh_token.unwrap(),
)
.await?;
@@ -291,7 +291,7 @@ impl<
self.inner.api_key()
}
/// Returns the application secret of the inner flow.
fn application_secret(&self) -> ApplicationSecret {
fn application_secret(&self) -> &ApplicationSecret {
self.inner.application_secret()
}