diff --git a/src/formats.rs b/src/formats.rs index 01db525..d73b80a 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -121,14 +121,13 @@ pub fn smart_write(f: &mut W, writeables: &[Writable]) -> io::Result<( } pub trait FormatSteps { - fn rename(&self, _f: &mut W, _from: &Path, _to: &Path) -> io::Result<()> { unreachable!() } - fn no_known_extension(&self, _f: &mut W, _path: &Path) -> io::Result<()> { unreachable!() } - fn unreadable(&self, _f: &mut W, _path: &Path) -> io::Result<()> { unreachable!() } - fn unknown_type(&self, _f: &mut W, _path: &Path) -> io::Result<()> { unreachable!() } - fn header(&self, _f: &mut W, _entries: &Entries) -> io::Result<()> { unreachable!() } - fn footer(&self, _f: &mut W, _entries: &Entries) -> io::Result<()> { unreachable!() } + fn rename(&self, _f: &mut W, _from: &Path, _to: &Path) -> io::Result<()>; + fn no_known_extension(&self, _f: &mut W, _path: &Path) -> io::Result<()> ; + fn unreadable(&self, _f: &mut W, _path: &Path) -> io::Result<()>; + fn unknown_type(&self, _f: &mut W, _path: &Path) -> io::Result<()>; + fn header(&self, _f: &mut W, _entries: &Entries) -> io::Result<()>; + fn footer(&self, _f: &mut W, _entries: &Entries) -> io::Result<()>; fn write_steps(&self, f: &mut W, entries: &Entries) -> io::Result<()> { - // TODO: clean this up - it's kinda messy self.header(f, entries)?; // output will be generated in the order: