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).
|
/// 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";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue