mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 15:40:03 +08:00
fix: feature use_serde
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rust_util"
|
name = "rust_util"
|
||||||
version = "0.6.8"
|
version = "0.6.9"
|
||||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Hatter's Rust Util"
|
description = "Hatter's Rust Util"
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ pub fn read_json_config<T>(config: Option<String>, files: &[String]) -> XResult<
|
|||||||
match config_path_buf_opt {
|
match config_path_buf_opt {
|
||||||
None => Ok(None),
|
None => Ok(None),
|
||||||
Some(config_path_buf) => {
|
Some(config_path_buf) => {
|
||||||
information!("Read config: {}", config_path_buf);
|
// information!("Read config: {}", config_path_buf);
|
||||||
let config_content = fs::read_to_string(config_path_buf)?;
|
let config_content = fs::read_to_string(config_path_buf)?;
|
||||||
Ok(Some((config_path_buf, serde_json::from_str(&config_content)?)))
|
Ok(Some((config_path_buf, serde_json::from_str(&config_content)?)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user