From c12ab8994c60e69e4319545da3f4930b0c07f5fe Mon Sep 17 00:00:00 2001 From: Rean Fei Date: Thu, 20 Jun 2024 23:47:26 +0800 Subject: [PATCH] Rename `get_reg_value()` to `get_reg_string()` --- src/cli/self_update/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/self_update/test.rs b/src/cli/self_update/test.rs index a5fa246999..b31572f3da 100644 --- a/src/cli/self_update/test.rs +++ b/src/cli/self_update/test.rs @@ -43,20 +43,20 @@ pub fn with_saved_path(f: &mut dyn FnMut()) { #[cfg(windows)] pub fn get_path() -> io::Result> { - get_reg_value(CURRENT_USER, "Environment", "PATH") + get_reg_string(CURRENT_USER, "Environment", "PATH") } #[cfg(windows)] pub fn with_saved_reg_value(root: &Key, subkey: &str, name: &str, f: &mut dyn FnMut()) { with_saved_global_state( - || get_reg_value(root, subkey, name), + || get_reg_string(root, subkey, name), |p| restore_reg_value(root, subkey, name, p), f, ) } #[cfg(windows)] -fn get_reg_value(root: &Key, subkey: &str, name: &str) -> io::Result> { +fn get_reg_string(root: &Key, subkey: &str, name: &str) -> io::Result> { let subkey = root.create(subkey)?; match subkey.get_string(name) { Ok(val) => Ok(Some(val)),