flush writer, makes partial deserialization a bit less likely
This commit is contained in:
parent
b2ea2455e2
commit
0696f9f497
|
@ -20,7 +20,8 @@ impl<'a, W: Write> EntryWriter<'a, W> {
|
|||
|
||||
fn write_entry(writer: &mut W, entry: &Entry) -> io::Result<()> {
|
||||
let serialized = serde_json::to_string(entry).unwrap();
|
||||
writeln!(writer, "{}", serialized)
|
||||
writeln!(writer, "{}", serialized)?;
|
||||
writer.flush()
|
||||
}
|
||||
|
||||
pub fn write_entries<I>(writer: &mut W, entries: I) -> io::Result<()>
|
||||
|
|
Loading…
Reference in New Issue