mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-17 11:32:54 +02:00
Add improvement note on parse
+ unparse
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user