Skip to content

Commit 7d497e1

Browse files
committed
refactor(self-update): use std::io
1 parent 6cf1f80 commit 7d497e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cli/self_update/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Support for functional tests.
22
3-
use std::sync::Mutex;
3+
use std::{io, sync::Mutex};
44

55
#[cfg(windows)]
66
use winreg::{
@@ -9,14 +9,14 @@ use winreg::{
99
};
1010

1111
#[cfg(windows)]
12-
pub fn get_path() -> std::io::Result<Option<RegValue>> {
12+
pub fn get_path() -> io::Result<Option<RegValue>> {
1313
let root = RegKey::predef(HKEY_CURRENT_USER);
1414
let environment = root
1515
.open_subkey_with_flags("Environment", KEY_READ | KEY_WRITE)
1616
.unwrap();
1717
match environment.get_raw_value("PATH") {
1818
Ok(val) => Ok(Some(val)),
19-
Err(ref e) if e.kind() == std::io::ErrorKind::NotFound => Ok(None),
19+
Err(ref e) if e.kind() == io::ErrorKind::NotFound => Ok(None),
2020
Err(e) => Err(e),
2121
}
2222
}
@@ -49,7 +49,7 @@ pub fn with_saved_path(f: &mut dyn FnMut()) {
4949
}
5050

5151
#[cfg(unix)]
52-
pub fn get_path() -> std::io::Result<Option<()>> {
52+
pub fn get_path() -> io::Result<Option<()>> {
5353
Ok(None)
5454
}
5555

0 commit comments

Comments
 (0)