mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-23 10:28:54 +01:00
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:
@@ -31,7 +31,7 @@ impl RefreshFlow {
|
||||
/// # Examples
|
||||
/// Please see the crate landing page for an example.
|
||||
pub async fn refresh_token<C: 'static + hyper::client::connect::Connect>(
|
||||
client: hyper::Client<C>,
|
||||
client: &hyper::Client<C>,
|
||||
client_secret: &ApplicationSecret,
|
||||
refresh_token: String,
|
||||
) -> Result<RefreshResult, RequestError> {
|
||||
@@ -129,7 +129,7 @@ mod tests {
|
||||
.create();
|
||||
let fut = async {
|
||||
let rr = RefreshFlow::refresh_token(
|
||||
client.clone(),
|
||||
&client,
|
||||
&app_secret,
|
||||
refresh_token.clone(),
|
||||
)
|
||||
@@ -158,7 +158,7 @@ mod tests {
|
||||
.create();
|
||||
|
||||
let fut = async {
|
||||
let rr = RefreshFlow::refresh_token(client, &app_secret, refresh_token)
|
||||
let rr = RefreshFlow::refresh_token(&client, &app_secret, refresh_token)
|
||||
.await
|
||||
.unwrap();
|
||||
match rr {
|
||||
|
||||
Reference in New Issue
Block a user