pub fn write_to_fmt(&self, toml: &str, mut out: impl fmt::Write) -> fmt::Result {
        // No alternative to copy-pasting :(
        write!(out, "{}", &self.contents[..self.start_offset])?;
        write!(out, "{}", toml)?;
        write!(out, "{}", &self.contents[self.end_offset..])
    }
Writes out the full contents, including the provided TOML, to the given `fmt::Write`
instance.

`std::io::Write` expects bytes to be written to it, so using it with a `&mut String` is
inconvenient. This alternative is more convenient, and also works for `fmt::Formatter`
instances.
tools/hakari/src/cargo_toml.rs