mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-04-09 13:49:59 +08:00
将序列化中[to_string]改为[to_string_pretty]进行格式化,改善显示效果
This commit is contained in:
@@ -41,7 +41,7 @@ impl Tree {
|
||||
|
||||
pub fn save(&self) -> String {
|
||||
let s = store::Store::new();
|
||||
let tree_data = serde_json::to_string(&self).unwrap();
|
||||
let tree_data = serde_json::to_string_pretty(&self).unwrap();
|
||||
let hash = s.save(&tree_data);
|
||||
hash
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user