Skip to content

Commit 232c313

Browse files
committed
Remove init() wrapper
1 parent 5a1e98a commit 232c313

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

examples/simple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[tokio::main]
22
async fn main() -> Result<(), Box<dyn std::error::Error>> {
33
env_logger::init();
4-
let authentication_manager = gcp_auth::init().await?;
4+
let authentication_manager = gcp_auth::AuthenticationManager::new().await?;
55
let _token = authentication_manager
66
.get_token(&["https://www.googleapis.com/auth/cloud-platform"])
77
.await?;

src/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,3 @@ pub use authentication_manager::AuthenticationManager;
7575
pub use custom_service_account::CustomServiceAccount;
7676
pub use error::Error;
7777
pub use types::{Signer, Token};
78-
79-
/// Initialize GCP authentication
80-
///
81-
/// This is a convenience wrapper around [`AuthenticationManager::new()`].
82-
pub async fn init() -> Result<AuthenticationManager, Error> {
83-
AuthenticationManager::new().await
84-
}

0 commit comments

Comments
 (0)