Inspired by #10345, I looked for other cases where
`toml_edit::easy::to_string` is used (which outputs inline tables) to
see if we should switch to `to_string_pretty`. The crates v1 file was
the only case I found.
As a side effect, we can no longer elide the empty `dev-dependencies`
table in published manifests. This was the behavior before `toml_edit`,
so not much of a loss.
let mut file = lock.file();
file.seek(SeekFrom::Start(0))?;
file.set_len(0)?;
- let data = toml::to_string(self)?;
+ let data = toml::to_string_pretty(self)?;
file.write_all(data.as_bytes())?;
Ok(())
}
Caused by:
TOML parse error at line 1, column 1
|
- 1 | [..] = { \"foo 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)\" = [\"foo[EXE]\"] }
+ 1 | [..]
| ^
Unexpected `[..]`
Expected key or end of input