refactor: remove lazy_static crate
The `lazy_static` crate was superseded by the `once_cell` crate which has been included in Rust's standard library since version `1.70`. Remove the `lazy_static` dependency and refactor all use cases to use `std::sync::OnceLock` instead. Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
@@ -94,7 +94,7 @@ impl WebApi {
|
||||
.as_ref()
|
||||
{
|
||||
channel.send(cmd).expect("can't send message to worker");
|
||||
let token_option = ASYNC_RUNTIME.block_on(token_rx).unwrap();
|
||||
let token_option = ASYNC_RUNTIME.get().unwrap().block_on(token_rx).unwrap();
|
||||
if let Some(token) = token_option {
|
||||
*self.api.token.lock().expect("can't writelock api token") = Some(Token {
|
||||
access_token: token.access_token,
|
||||
|
||||
Reference in New Issue
Block a user