@@ -33,7 +33,7 @@ pub fn with_saved_global_state<S>(
33
33
34
34
#[ cfg( windows) ]
35
35
pub fn with_saved_path ( f : & mut dyn FnMut ( ) ) {
36
- with_saved_reg_value ( CURRENT_USER , "Environment" , "PATH" , f)
36
+ with_saved_reg_string ( CURRENT_USER , "Environment" , "PATH" , f)
37
37
}
38
38
39
39
#[ cfg( unix) ]
@@ -47,10 +47,10 @@ pub fn get_path() -> io::Result<Option<String>> {
47
47
}
48
48
49
49
#[ cfg( windows) ]
50
- pub fn with_saved_reg_value ( root : & Key , subkey : & str , name : & str , f : & mut dyn FnMut ( ) ) {
50
+ pub fn with_saved_reg_string ( root : & Key , subkey : & str , name : & str , f : & mut dyn FnMut ( ) ) {
51
51
with_saved_global_state (
52
52
|| get_reg_string ( root, subkey, name) ,
53
- |p| restore_reg_value ( root, subkey, name, p) ,
53
+ |p| restore_reg_string ( root, subkey, name, p) ,
54
54
f,
55
55
)
56
56
}
@@ -66,7 +66,7 @@ fn get_reg_string(root: &Key, subkey: &str, name: &str) -> io::Result<Option<Str
66
66
}
67
67
68
68
#[ cfg( windows) ]
69
- fn restore_reg_value ( root : & Key , subkey : & str , name : & str , p : Option < String > ) {
69
+ fn restore_reg_string ( root : & Key , subkey : & str , name : & str , p : Option < String > ) {
70
70
let subkey = root. create ( subkey) . unwrap ( ) ;
71
71
if let Some ( p) = p. as_ref ( ) {
72
72
subkey. set_string ( name, p) . unwrap ( ) ;
0 commit comments