Serialize TOML pretty

This commit is contained in:
Matthias Beyer 2017-09-20 16:46:04 +02:00
parent 4b906f27b1
commit 79b6c26502
1 changed files with 2 additions and 2 deletions

View File

@ -987,7 +987,7 @@ impl Entry {
/// disk). /// disk).
pub fn to_str(&self) -> String { pub fn to_str(&self) -> String {
format!("---\n{header}---\n{content}", 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) content = self.content)
} }
@ -1325,7 +1325,7 @@ mod test {
static TEST_ENTRY : &'static str = "--- static TEST_ENTRY : &'static str = "---
[imag] [imag]
version = \"0.0.3\" version = '0.0.3'
--- ---
Hai"; Hai";