use std::io::{Result, Write};

pub trait WriteTo {
    fn write_to(&self, f: &mut impl Write) -> Result<()>;
}

impl WriteTo for [Vec<u8>] {
    fn write_to(&self, f: &mut impl Write) -> Result<()> {
        for line in self.iter() {
            f.write_all(line)?;
        }
        Ok(())
    }
}
