From d3c2d2bb9ee0c572178b0fa3dd2443290a893cb2 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 15 Dec 2019 11:25:09 +0800 Subject: [PATCH] change fn visible --- src/config_util.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config_util.rs b/src/config_util.rs index 61b77ec..6c7dafa 100644 --- a/src/config_util.rs +++ b/src/config_util.rs @@ -187,7 +187,7 @@ fn parse_oss_config(oss_config: &json::JsonValue) -> OSSConfig { } } -pub fn get_string_value(json: &json::JsonValue, key: &str) -> Option { +fn get_string_value(json: &json::JsonValue, key: &str) -> Option { let value = &json[key]; match value.is_string() { true => Some(value.as_str().unwrap().to_string()), @@ -280,7 +280,7 @@ fn get_config_content(custom_oss_backupd_config: Option<&str>, verbose: bool) -> None } -pub fn get_user_home() -> XResult { +fn get_user_home() -> XResult { match dirs::home_dir() { None => Err(new_box_ioerror("Home dir not found!")), Some(home_dir_o) => match home_dir_o.to_str() { @@ -290,6 +290,6 @@ pub fn get_user_home() -> XResult { } } - pub fn get_user_home_dir(dir: &str) -> XResult { + fn get_user_home_dir(dir: &str) -> XResult { Ok(format!("{}/{}", get_user_home()?, dir)) }