diff options
author | Alex Crichton <alex@alexcrichton.com> | 2017-07-27 11:29:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 11:29:00 -0500 |
commit | 6b3efa1e0849fbf393e2b41473e807bb644843ea (patch) | |
tree | 7bb58a9c5a5965403f3741f8fdee4cfc0ebd956b /src | |
parent | 71ac3e25f63edac92b4f6cc4ea709491390796ff (diff) | |
parent | 219de2dd4d60420f810cb60496d41f164e5c06b0 (diff) | |
download | milf-rs-6b3efa1e0849fbf393e2b41473e807bb644843ea.tar.gz milf-rs-6b3efa1e0849fbf393e2b41473e807bb644843ea.zip |
Merge pull request #199 from vitiral/empty-fails
demonstrate failing test for 'empty' values
Diffstat (limited to 'src')
-rw-r--r-- | src/ser.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -930,6 +930,15 @@ impl<'a, 'b> ser::SerializeStruct for SerializeTable<'a, 'b> { } fn end(self) -> Result<(), Error> { + match self { + SerializeTable::Datetime(_) => {}, + SerializeTable::Table { mut ser, first, .. } => { + if first.get() { + let state = ser.state.clone(); + ser.emit_table_header(&state)?; + } + } + } Ok(()) } } |