File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ pub use crate::player::PlayerStateEvent;
236236pub use anni_player:: AnniPlayer ;
237237use anni_player:: TypedPriorityProvider ;
238238#[ cfg( target_os = "windows" ) ]
239- use once_cell :: sync:: OnceCell ;
239+ use std :: sync:: Once ;
240240
241241#[ frb( mirror( ProgressState ) ) ]
242242pub struct _ProgressState {
@@ -266,7 +266,7 @@ fn update_player_state_stream(
266266pub type StreamWrapper < T > = Arc < OnceLock < RwLock < Option < StreamSink < T > > > > > ;
267267
268268#[ cfg( target_os = "windows" ) ]
269- static LOGGER_INIT : OnceCell < ( ) > = OnceCell :: new ( ) ;
269+ static LOGGER_INIT : Once = Once :: new ( ) ;
270270
271271pub struct AnnixPlayer {
272272 pub player : RustOpaque < AnniPlayer > ,
@@ -277,7 +277,7 @@ pub struct AnnixPlayer {
277277impl AnnixPlayer {
278278 pub fn new ( cache_path : String ) -> SyncReturn < AnnixPlayer > {
279279 #[ cfg( target_os = "windows" ) ]
280- LOGGER_INIT . get_or_init ( || env_logger:: init ( ) ) ;
280+ LOGGER_INIT . call_once ( || env_logger:: init ( ) ) ;
281281
282282 let ( player, receiver) =
283283 AnniPlayer :: new ( TypedPriorityProvider :: new ( vec ! [ ] ) , cache_path. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments