We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2dd829 commit b787d72Copy full SHA for b787d72
library/std/tests/env.rs
@@ -1,6 +1,5 @@
1
use std::env::*;
2
use std::ffi::{OsStr, OsString};
3
-use std::path::PathBuf;
4
5
use rand::distributions::Alphanumeric;
6
use rand::{thread_rng, Rng};
@@ -92,6 +91,8 @@ fn env_home_dir() {
92
91
93
cfg_if::cfg_if! {
94
if #[cfg(unix)] {
+ use std::path::PathBuf;
95
+
96
let oldhome = var_to_os_string(var("HOME"));
97
98
set_var("HOME", "/home/MountainView");
@@ -109,6 +110,8 @@ fn env_home_dir() {
109
110
111
if let Some(oldhome) = oldhome { set_var("HOME", oldhome); }
112
} else if #[cfg(windows)] {
113
114
115
116
let olduserprofile = var_to_os_string(var("USERPROFILE"));
117
0 commit comments