Skip to content

Commit b1555a5

Browse files
committed
std: Refactor _var function to use env_imp::getenv
1 parent db6bc0f commit b1555a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub fn var<K: AsRef<OsStr>>(key: K) -> Result<String, VarError> {
224224
}
225225

226226
fn _var(key: &OsStr) -> Result<String, VarError> {
227-
match var_os(key) {
227+
match env_imp::getenv(key) {
228228
Some(s) => s.into_string().map_err(VarError::NotUnicode),
229229
None => Err(VarError::NotPresent),
230230
}

0 commit comments

Comments
 (0)