浏览代码

fix some clippy lints

Evan Almloff 1 年之前
父节点
当前提交
3e55bb8885
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      packages/core-macro/src/props/mod.rs
  2. 1 1
      packages/html-internal-macro/src/lib.rs
  3. 1 1
      packages/rsx/src/lib.rs

+ 1 - 1
packages/core-macro/src/props/mod.rs

@@ -554,7 +554,7 @@ mod struct_info {
                     let name = f.name;
                     let mut visitor = VisitFirstLifetime(None);
 
-                    visitor.visit_type(&f.ty);
+                    visitor.visit_type(f.ty);
 
                     visitor.0.ok_or_else(|| {
                         syn::Error::new_spanned(

+ 1 - 1
packages/html-internal-macro/src/lib.rs

@@ -29,7 +29,7 @@ impl Parse for ImplExtensionAttributes {
         let attrs = content.parse_terminated(Ident::parse, Token![,])?;
 
         Ok(ImplExtensionAttributes {
-            is_element: element.to_string() == "ELEMENT",
+            is_element: element == "ELEMENT",
             name,
             attrs,
         })

+ 1 - 1
packages/rsx/src/lib.rs

@@ -390,7 +390,7 @@ impl<'a> DynamicContext<'a> {
 
                         _ => {
                             let idx = match mapping {
-                                Some(mapping) => mapping.get_attribute_idx(&attr)?,
+                                Some(mapping) => mapping.get_attribute_idx(attr)?,
                                 None => self.dynamic_attributes.len(),
                             };
                             self.dynamic_attributes.push(attr);