rust-cli / human-panic

Panic messages for humans.
https://docs.rs/human-panic
Apache License 2.0
1.66k stars 65 forks source link

Remove `toml` dependency #118

Closed link2xt closed 11 months ago

link2xt commented 1 year ago

It is currently only used in report.rs to serialize a few strings to a file. The whole toml dependency is an overkill for this, just an additional dependency to be upgraded all the time.

String escaping could be reimplemented locally if you want to generate a valid TOML and not break compatibility, just escape the quotes and backslashes or something like this.

epage commented 1 year ago

Personally, I do not want to get into dealing with the correctness of doing string escaping with arbitrary content. This is with me being fairly familiar with the toml spec as I'm also the maintainer of toml and toml_edit. Cargo does this in select places (also a cargo team member) but its for very controlled text.

epage commented 11 months ago

120 upgraded toml to a version that allowed us to drop the parser, keeping only the rendering.