mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: fix warnings in various modules in components (#31568)
* clippy: fix warnings in various modules in components * fix: unit tests * fix: build on android * fix: all samplers use new_boxed
This commit is contained in:
parent
19f1f2a8f4
commit
3a5ca785d3
24 changed files with 107 additions and 118 deletions
|
@ -20,13 +20,13 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
// Work around https://github.com/rust-lang/rust/issues/46489
|
||||
let attributes: TokenStream = attributes.to_string().parse().unwrap();
|
||||
|
||||
let output: TokenStream = attributes.into_iter().chain(input.into_iter()).collect();
|
||||
let output: TokenStream = attributes.into_iter().chain(input).collect();
|
||||
|
||||
let item: Item = syn::parse(output).unwrap();
|
||||
|
||||
if let Item::Struct(s) = item {
|
||||
let s2 = s.clone();
|
||||
if s.generics.params.len() > 0 {
|
||||
if !s.generics.params.is_empty() {
|
||||
return quote!(#s2).into();
|
||||
}
|
||||
if let Fields::Named(ref f) = s.fields {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue