Serialize TOML pretty
This commit is contained in:
parent
4b906f27b1
commit
79b6c26502
1 changed files with 2 additions and 2 deletions
|
@ -987,7 +987,7 @@ impl Entry {
|
|||
/// disk).
|
||||
pub fn to_str(&self) -> String {
|
||||
format!("---\n{header}---\n{content}",
|
||||
header = ::toml::ser::to_string(&self.header).unwrap(),
|
||||
header = ::toml::ser::to_string_pretty(&self.header).unwrap(),
|
||||
content = self.content)
|
||||
}
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ mod test {
|
|||
|
||||
static TEST_ENTRY : &'static str = "---
|
||||
[imag]
|
||||
version = \"0.0.3\"
|
||||
version = '0.0.3'
|
||||
---
|
||||
Hai";
|
||||
|
||||
|
|
Loading…
Reference in a new issue