1
1
use std:: env:: { consts:: EXE_SUFFIX , split_paths} ;
2
2
use std:: ffi:: { OsStr , OsString } ;
3
3
use std:: fmt;
4
- use std:: io:: { self , Write } ;
4
+ #[ cfg( any( test, feature = "test" ) ) ]
5
+ use std:: io;
6
+ use std:: io:: Write ;
5
7
use std:: os:: windows:: ffi:: { OsStrExt , OsStringExt } ;
6
8
use std:: path:: Path ;
7
9
use std:: process:: Command ;
8
- use std:: sync:: { Arc , LockResult , Mutex , MutexGuard } ;
10
+ use std:: sync:: { Arc , Mutex } ;
11
+ #[ cfg( any( test, feature = "test" ) ) ]
12
+ use std:: sync:: { LockResult , MutexGuard } ;
9
13
10
14
use anyhow:: { anyhow, Context , Result } ;
11
15
use tracing:: { info, warn} ;
16
+ use winreg:: enums:: { RegType , HKEY_CURRENT_USER , KEY_READ , KEY_WRITE } ;
17
+ #[ cfg( any( test, feature = "test" ) ) ]
18
+ use winreg:: types:: { FromRegValue , ToRegValue } ;
19
+ use winreg:: { RegKey , RegValue } ;
12
20
13
21
use super :: super :: errors:: * ;
14
22
use super :: common;
@@ -19,10 +27,6 @@ use crate::dist::TargetTriple;
19
27
use crate :: utils:: utils;
20
28
use crate :: utils:: Notification ;
21
29
22
- use winreg:: enums:: { RegType , HKEY_CURRENT_USER , KEY_READ , KEY_WRITE } ;
23
- use winreg:: types:: { FromRegValue , ToRegValue } ;
24
- use winreg:: { RegKey , RegValue } ;
25
-
26
30
pub ( crate ) fn ensure_prompt ( process : & Process ) -> Result < ( ) > {
27
31
writeln ! ( process. stdout( ) . lock( ) , ) ?;
28
32
writeln ! ( process. stdout( ) . lock( ) , "Press the Enter key to continue." ) ?;
0 commit comments