Created
March 21, 2023 19:02
-
-
Save sam0x17/8b09fccfa7a457e6cd3c86ccb38e517f to your computer and use it in GitHub Desktop.
how to use prettyplease for syntax formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let formatted = prettyplease::unparse(&syn::parse_file(output.to_string().as_str()).unwrap()); | |
// where output is a TokenStream2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment