mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
style: Reformat recent changes.
This commit is contained in:
parent
7c4f9bbf49
commit
8c004c0858
40 changed files with 571 additions and 212 deletions
|
@ -12,10 +12,7 @@ pub fn derive(mut input: syn::DeriveInput) -> TokenStream {
|
|||
let attrs = cg::parse_input_attrs::<ShmemInputAttrs>(&input);
|
||||
if !attrs.no_bounds {
|
||||
for param in input.generics.type_params() {
|
||||
cg::add_predicate(
|
||||
&mut where_clause,
|
||||
parse_quote!(#param: ::to_shmem::ToShmem),
|
||||
);
|
||||
cg::add_predicate(&mut where_clause, parse_quote!(#param: ::to_shmem::ToShmem));
|
||||
}
|
||||
}
|
||||
for variant in Structure::new(&input).variants() {
|
||||
|
@ -23,10 +20,7 @@ pub fn derive(mut input: syn::DeriveInput) -> TokenStream {
|
|||
let attrs = cg::parse_field_attrs::<ShmemFieldAttrs>(&binding.ast());
|
||||
if attrs.field_bound {
|
||||
let ty = &binding.ast().ty;
|
||||
cg::add_predicate(
|
||||
&mut where_clause,
|
||||
parse_quote!(#ty: ::to_shmem::ToShmem),
|
||||
)
|
||||
cg::add_predicate(&mut where_clause, parse_quote!(#ty: ::to_shmem::ToShmem))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue