Rustfmt

parent fd8cfec6
Pipeline #24146 failed with stages
in 5 minutes and 12 seconds
......@@ -47,8 +47,7 @@ pub fn get_program_classes<'a>(program: &'a Program) -> Vec<&'a Class> {
} else {
None
}
})
.collect()
}).collect()
}
pub struct Class {
......
......@@ -33,8 +33,7 @@ pub fn slot_assignments<'ast>(names: &Names, slots: &[Slot<'ast>]) -> Vec<TokenS
vtable.#signalname = Some(#InstanceNameFfi::#trampoline_name);
})
}
})
.collect::<Vec<_>>()
}).collect::<Vec<_>>()
}
// If you rename this function, or move stuff out of it, please
......@@ -85,8 +84,7 @@ pub fn instance_slot_trampolines<'ast>(
Slot::VirtualMethod(VirtualMethod { ref sig, .. }) => Some(tokens(sig, None)),
Slot::Signal(ref signal) => Some(tokens(&signal.sig, None)),
})
.collect::<Vec<_>>();
}).collect::<Vec<_>>();
if let Some(overrides) = overrides {
ret.extend(
......
......@@ -28,8 +28,7 @@ pub fn codegen(program: &Program) -> TokenStream {
.map(|class| {
let cx = ClassContext::new(program, class);
cx.gen_class()
})
.collect::<Vec<_>>();
}).collect::<Vec<_>>();
let interface_tokens = program
.interfaces
......@@ -37,8 +36,7 @@ pub fn codegen(program: &Program) -> TokenStream {
.map(|iface| {
let cx = InterfaceContext::new(program, iface);
cx.gen_interface()
})
.collect::<Vec<_>>();
}).collect::<Vec<_>>();
quote! {
#(#class_tokens)*
......
......@@ -15,8 +15,7 @@ pub fn properties_enum<'ast>(properties: &[Property<'ast>]) -> TokenStream {
let name = &prop.name;
let index = (i as u32) + 1;
quote! { #name = #index }
})
.collect();
}).collect();
quote! {
#[repr(u32)]
......@@ -43,8 +42,7 @@ pub fn property_setter<'ast>(properties: &[Property<'ast>]) -> TokenStream {
#body
}
}
})
.collect();
}).collect();
quote! {
#[allow(dead_code, unused_variables)]
......@@ -82,8 +80,7 @@ pub fn property_getter<'ast>(properties: &[Property<'ast>]) -> TokenStream {
}
}
}
})
.collect();
}).collect();
quote! {
#[allow(dead_code, unused_variables)]
......@@ -119,8 +116,7 @@ pub fn set_properties<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
}
}
}
})
.collect()
}).collect()
}
pub fn get_properties<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
......@@ -146,8 +142,7 @@ pub fn get_properties<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
value.get::<#type_>().unwrap()
}
}
})
.collect()
}).collect()
}
pub fn set_properties_fn<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
......@@ -163,8 +158,7 @@ pub fn set_properties_fn<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream
quote! {
fn #name(&self, v: #type_);
}
})
.collect()
}).collect()
}
pub fn get_properties_fn<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
......@@ -180,8 +174,7 @@ pub fn get_properties_fn<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream
quote! {
fn #name(&self) -> #type_;
}
})
.collect()
}).collect()
}
fn prop_registration<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
......@@ -220,8 +213,7 @@ fn prop_registration<'ast>(properties: &[Property<'ast>]) -> Vec<TokenStream> {
//| gobject_ffi::G_PARAM_CONSTRUCT_ONLY,
));
}
})
.collect()
}).collect()
}
pub fn properties_registration<'ast>(properties: &[Property<'ast>]) -> TokenStream {
......
......@@ -63,8 +63,7 @@ pub fn signal_emit_methods<'ast>(
}
}
}
})
.collect()
}).collect()
}
pub fn signal_id_names<'ast>(signals: impl Iterator<Item = &'ast Signal<'ast>>) -> Vec<Ident> {
......@@ -126,8 +125,7 @@ pub fn signal_declarations<'ast>(
mut_override(param_gtypes.as_ptr())
);
}
})
.collect()
}).collect()
}
pub fn signal_trampolines<'ast>(
......@@ -167,8 +165,7 @@ pub fn signal_trampolines<'ast>(
#ret
}
}
})
.collect()
}).collect()
}
/// From a signal called `foo`, generate `foo_signal_id`. This is used to
......
......@@ -24,8 +24,7 @@ pub fn tokens_ParentInstance(class: &ast::Class) -> TokenStream {
let mut tokens = TokenStream::new();
path.to_tokens(&mut tokens);
tokens
})
.unwrap_or_else(tokens_GObject)
}).unwrap_or_else(tokens_GObject)
}
pub fn tokens_ParentInstanceFfi(class: &ast::Class) -> TokenStream {
......
......@@ -398,8 +398,7 @@ fn extract_inputs<'ast>(punc: &'ast Punctuated<syn::FnArg, Token!(,)>) -> Result
syn::FnArg::SelfValue(_) => bail!("by-value self not implemented"),
syn::FnArg::Inferred(_) => bail!("cannot have inferred function arguments"),
syn::FnArg::Ignored(_) => bail!("cannot have ignored function arguments"),
})
.collect()
}).collect()
}
impl<'ast> Ty<'ast> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment