change fn visible
This commit is contained in:
@@ -187,7 +187,7 @@ fn parse_oss_config(oss_config: &json::JsonValue) -> OSSConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_string_value(json: &json::JsonValue, key: &str) -> Option<String> {
|
fn get_string_value(json: &json::JsonValue, key: &str) -> Option<String> {
|
||||||
let value = &json[key];
|
let value = &json[key];
|
||||||
match value.is_string() {
|
match value.is_string() {
|
||||||
true => Some(value.as_str().unwrap().to_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
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_user_home() -> XResult<String> {
|
fn get_user_home() -> XResult<String> {
|
||||||
match dirs::home_dir() {
|
match dirs::home_dir() {
|
||||||
None => Err(new_box_ioerror("Home dir not found!")),
|
None => Err(new_box_ioerror("Home dir not found!")),
|
||||||
Some(home_dir_o) => match home_dir_o.to_str() {
|
Some(home_dir_o) => match home_dir_o.to_str() {
|
||||||
@@ -290,6 +290,6 @@ pub fn get_user_home() -> XResult<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_user_home_dir(dir: &str) -> XResult<String> {
|
fn get_user_home_dir(dir: &str) -> XResult<String> {
|
||||||
Ok(format!("{}/{}", get_user_home()?, dir))
|
Ok(format!("{}/{}", get_user_home()?, dir))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user