File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,11 @@ fn test_env_set_var() {
7878}
7979
8080#[ test]
81- #[ cfg_attr( any( target_os = "emscripten" , target_env = "sgx" ) , ignore) ]
81+ #[ cfg_attr( not ( any( unix , windows ) ) , ignore, allow ( unused ) ) ]
8282#[ allow( deprecated) ]
8383fn env_home_dir ( ) {
84+ use std:: path:: PathBuf ;
85+
8486 fn var_to_os_string ( var : Result < String , VarError > ) -> Option < OsString > {
8587 match var {
8688 Ok ( var) => Some ( OsString :: from ( var) ) ,
@@ -91,8 +93,6 @@ fn env_home_dir() {
9193
9294 cfg_if:: cfg_if! {
9395 if #[ cfg( unix) ] {
94- use std:: path:: PathBuf ;
95-
9696 let oldhome = var_to_os_string( var( "HOME" ) ) ;
9797
9898 set_var( "HOME" , "/home/MountainView" ) ;
@@ -110,8 +110,6 @@ fn env_home_dir() {
110110
111111 if let Some ( oldhome) = oldhome { set_var( "HOME" , oldhome) ; }
112112 } else if #[ cfg( windows) ] {
113- use std:: path:: PathBuf ;
114-
115113 let oldhome = var_to_os_string( var( "HOME" ) ) ;
116114 let olduserprofile = var_to_os_string( var( "USERPROFILE" ) ) ;
117115
You can’t perform that action at this time.
0 commit comments