feat: pretty print .crates.toml manifest to match cargo behaviour (#984)

Fixed #970
This commit is contained in:
Milo Moisson 2023-04-10 16:48:01 +02:00 committed by GitHub
parent 8ccb6c887a
commit 75f48cce3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,8 +89,8 @@ impl CratesToml<'_> {
this: &CratesToml<'_>,
writer: &mut dyn io::Write,
) -> Result<(), CratesTomlParseError> {
let data = toml_edit::ser::to_vec(&this)?;
writer.write_all(&data)?;
let data = toml_edit::ser::to_string_pretty(&this)?;
writer.write_all(data.as_bytes())?;
Ok(())
}