File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11use crate :: prelude:: * ;
2- use tokio :: sync:: Mutex ;
2+ use std :: sync:: Mutex ;
33
44#[ async_trait]
55pub trait ServiceAccount : Send {
@@ -20,7 +20,7 @@ impl AuthenticationManager {
2020 ///
2121 /// Token can be used in the request authorization header in format "Bearer {token}"
2222 pub async fn get_token ( & self , scopes : & [ & str ] ) -> Result < Token , Error > {
23- let mut sa = self . service_account . lock ( ) . await ;
23+ let mut sa = self . service_account . lock ( ) . unwrap ( ) ;
2424 let mut token = sa. get_token ( scopes) ;
2525
2626 if token. is_none ( ) || token. clone ( ) . unwrap ( ) . has_expired ( ) {
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pub use types::Token;
7272
7373use hyper:: Client ;
7474use hyper_rustls:: HttpsConnector ;
75- use tokio :: sync:: Mutex ;
75+ use std :: sync:: Mutex ;
7676
7777/// Initialize GCP authentication
7878///
You can’t perform that action at this time.
0 commit comments