From cff54b47ffccb98f14333d716c3b2aec82de8024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sampo=20Kivist=C3=B6?= Date: Sat, 2 Mar 2024 17:21:08 +0200 Subject: [PATCH] cleaning code --- src/jsx/mod.rs | 4 ++-- src/refresh/util.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jsx/mod.rs b/src/jsx/mod.rs index 7fad4c9..bc2de89 100644 --- a/src/jsx/mod.rs +++ b/src/jsx/mod.rs @@ -1129,7 +1129,7 @@ fn create_vnode_args( Box::new(Expr::Lit(Lit::Num(Number { span: DUMMY_SP, raw: None, - value: (child_flags) as f64, + value: child_flags as f64, }))) .as_arg(), ), @@ -1270,7 +1270,7 @@ fn create_fragment_vnode_args( Box::new(Expr::Lit(Lit::Num(Number { span: DUMMY_SP, raw: None, - value: (child_flags) as f64, + value: child_flags as f64, }))) .as_arg(), ), diff --git a/src/refresh/util.rs b/src/refresh/util.rs index 8113dc9..a429cb8 100644 --- a/src/refresh/util.rs +++ b/src/refresh/util.rs @@ -109,7 +109,7 @@ impl Visit for UsedInJsx { ident.sym.as_ref(), "createElement" | "jsx" | "jsxDEV" | "jsxs" ) { - if let Some(ExprOrSpread { expr, .. }) = n.args.get(0) { + if let Some(ExprOrSpread { expr, .. }) = n.args.first() { if let Expr::Ident(ident) = expr.as_ref() { self.0.insert(ident.to_id()); }