mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-02-07 12:24:46 +08:00
将序列化中[to_string]改为[to_string_pretty]进行格式化,改善显示效果
This commit is contained in:
@@ -44,7 +44,7 @@ impl Commit {
|
||||
pub fn save(&mut self) -> String {
|
||||
// unimplemented!()
|
||||
let s = store::Store::new();
|
||||
let commit_data = serde_json::to_string(&self).unwrap();
|
||||
let commit_data = serde_json::to_string_pretty(&self).unwrap();
|
||||
let hash = s.save(&commit_data);
|
||||
self.hash = hash.clone();
|
||||
hash
|
||||
|
||||
Reference in New Issue
Block a user