From cd821f575de094a195eeee491e4dbd4727d4d3db Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Thu, 25 Nov 2021 19:45:08 +0100 Subject: [PATCH] Make doc tests pass --- src/authenticator.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/authenticator.rs b/src/authenticator.rs index 2564650..8b67d2c 100644 --- a/src/authenticator.rs +++ b/src/authenticator.rs @@ -257,10 +257,16 @@ impl ServiceAccountAuthenticator { } } +// TODO: Can those use statements be cleaned up? /// Create an authenticator that uses a application default credentials. /// ``` /// # async fn foo() { -/// let authenticator = match ApplicationDefaultCredentialsAuthenticator::builder().await { +/// use yup_oauth2::ApplicationDefaultCredentialsAuthenticator; +/// use yup_oauth2::ApplicationDefaultCredentialsFlowOpts; +/// use yup_oauth2::authenticator::ApplicationDefaultCredentialsTypes; +/// +/// let opts = ApplicationDefaultCredentialsFlowOpts::default(); +/// let authenticator = match ApplicationDefaultCredentialsAuthenticator::builder(opts).await { /// ApplicationDefaultCredentialsTypes::InstanceMetadata(auth) => auth /// .build() /// .await