Skip to content

Commit b787d72

Browse files
author
Jethro Beekman
committed
Fix SGX CI
Broken in #79038
1 parent b2dd829 commit b787d72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/tests/env.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::env::*;
22
use std::ffi::{OsStr, OsString};
3-
use std::path::PathBuf;
43

54
use rand::distributions::Alphanumeric;
65
use rand::{thread_rng, Rng};
@@ -92,6 +91,8 @@ fn env_home_dir() {
9291

9392
cfg_if::cfg_if! {
9493
if #[cfg(unix)] {
94+
use std::path::PathBuf;
95+
9596
let oldhome = var_to_os_string(var("HOME"));
9697

9798
set_var("HOME", "/home/MountainView");
@@ -109,6 +110,8 @@ fn env_home_dir() {
109110

110111
if let Some(oldhome) = oldhome { set_var("HOME", oldhome); }
111112
} else if #[cfg(windows)] {
113+
use std::path::PathBuf;
114+
112115
let oldhome = var_to_os_string(var("HOME"));
113116
let olduserprofile = var_to_os_string(var("USERPROFILE"));
114117

0 commit comments

Comments
 (0)