style(treewide): Format
This commit is contained in:
parent
7f6c76a6a6
commit
a766149521
|
@ -31,11 +31,7 @@ use crate::{
|
|||
impl Function {
|
||||
pub fn to_c(&self, config: &TrixyConfig, namespaces: &Vec<&Identifier>) -> TokenStream2 {
|
||||
let ident = self.identifier.to_c_with_path(namespaces);
|
||||
let inputs: Vec<TokenStream2> = self
|
||||
.inputs
|
||||
.iter()
|
||||
.map(NamedType::to_c)
|
||||
.collect();
|
||||
let inputs: Vec<TokenStream2> = self.inputs.iter().map(NamedType::to_c).collect();
|
||||
|
||||
let callback_function = format_ident!("{}", config.callback_function);
|
||||
|
||||
|
|
|
@ -34,9 +34,11 @@ pub mod rust;
|
|||
|
||||
pub fn format_rust(input: TokenStream2) -> String {
|
||||
prettyplease::unparse(
|
||||
&syn::parse2(input.clone()).map_err(|err| {
|
||||
eprintln!("{}:\n===\n{}\n===\n", err, input);
|
||||
}).expect("This code was generated, it should also be parsable"),
|
||||
&syn::parse2(input.clone())
|
||||
.map_err(|err| {
|
||||
eprintln!("{}:\n===\n{}\n===\n", err, input);
|
||||
})
|
||||
.expect("This code was generated, it should also be parsable"),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue