1
1
use std:: ffi:: { OsStr , OsString } ;
2
2
pub use std:: process:: Command ;
3
3
use std:: {
4
- borrow:: Cow , env, io:: Read , path:: PathBuf , process:: ExitStatus , process:: Stdio , time:: Duration ,
4
+ borrow:: Cow , env, io:: Read , path:: PathBuf , process:: ExitStatus , process:: Stdio , sync:: OnceLock ,
5
+ time:: Duration ,
5
6
} ;
6
7
7
8
use anyhow:: { bail, Context as _, Result } ;
8
9
use indicatif:: { ProgressBar , ProgressStyle } ;
9
10
use log:: LevelFilter ;
10
- use once_cell:: sync:: { Lazy , OnceCell } ;
11
+ use once_cell:: sync:: Lazy ;
11
12
12
13
use crate :: { config:: Config , git, platform, util} ;
13
14
@@ -25,9 +26,9 @@ const DEFAULT_SHELL: &str = "/bin/sh";
25
26
pub static SHELL : Lazy < OsString > =
26
27
Lazy :: new ( || ( env:: var_os ( "SHELL" ) . unwrap_or_else ( || DEFAULT_SHELL . into ( ) ) ) ) ;
27
28
28
- static VERBOSITY : OnceCell < LevelFilter > = OnceCell :: new ( ) ;
29
- static CONFIG : OnceCell < Config > = OnceCell :: new ( ) ;
30
- static PATH : OnceCell < String > = OnceCell :: new ( ) ;
29
+ static VERBOSITY : OnceLock < LevelFilter > = OnceLock :: new ( ) ;
30
+ static CONFIG : OnceLock < Config > = OnceLock :: new ( ) ;
31
+ static PATH : OnceLock < String > = OnceLock :: new ( ) ;
31
32
32
33
pub fn verbosity ( ) -> & ' static LevelFilter {
33
34
VERBOSITY . get ( ) . expect ( "verbosity is not initialized" )
0 commit comments