Function rustminify::minify_file
source · pub fn minify_file(file: &File) -> String
Expand description
Minifies a File
.
Currently this is just a shorthand for minify_tokens(file.to_token_stream())
.
Unnecessary spaces may be left.
use syn::parse_quote;
assert_eq!(
r#"mod a{fn hello()->&'static str{"Hello"}}"#,
rustminify::minify_file(&parse_quote! {
mod a {
fn hello() -> &'static str {
"Hello"
}
}
}),
);