Add improvement note on parse + unparse

This commit is contained in:
cyqsimon authored and Keith Hall committed 2025-07-10 23:31:12 +03:00
1 parent 563c4c290d
commit 68df079c0e
1 file changed
+3
+3
View File
@@ -288,6 +288,9 @@ pub fn build_static_mappings() -> anyhow::Result<()> {
println!("cargo:rerun-if-changed=src/syntax_mapping/builtins/");
let mappings = read_all_mappings()?;
// IMPRV: parse + unparse is a bit cringe, but there seems to be no better
// option given the limited APIs of `prettyplease`
let rs_src = syn::parse_file(&mappings.to_token_stream().to_string())?;
let rs_src_pretty = prettyplease::unparse(&rs_src);