use crate::entry::Entry;
use std::borrow::Borrow;
use std::io::{self, Write};
pub fn write<E: Borrow<Entry>>(w: &mut impl Write, entries: &[E]) -> io::Result<()> {
for e in entries {
let line = serde_json::to_string(e.borrow()).map_err(io::Error::other)?;
writeln!(w, "{}", line)?;
}
Ok(())
}