diff options
author | eri <eri@inventati.org> | 2024-03-08 15:28:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 14:28:04 +0000 |
commit | 3a5ca785d3ecc1fd6cb5a519cf1a91ac61e15c8c (patch) | |
tree | 2843ccbe15ded63b5addc6c0be52d3ec9eaf3d97 /components/dom_struct | |
parent | 19f1f2a8f4a18b17fc9c4ce80df831a339ce91f0 (diff) | |
download | servo-3a5ca785d3ecc1fd6cb5a519cf1a91ac61e15c8c.tar.gz servo-3a5ca785d3ecc1fd6cb5a519cf1a91ac61e15c8c.zip |
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
Diffstat (limited to 'components/dom_struct')
-rw-r--r-- | components/dom_struct/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs index 3cafbb48731..31b41459ebb 100644 --- a/components/dom_struct/lib.rs +++ b/components/dom_struct/lib.rs @@ -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 { |