Skip to content

Commit 1752474

Browse files
committed
clippy
1 parent b881a22 commit 1752474

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/jsx/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn parse_expr_for_jsx(
5656
top_level_mark: Mark,
5757
) -> Arc<Box<Expr>> {
5858
let fm = cm.new_source_file(
59-
FileName::Custom(format!("<jsx-config-{}.js>", name)).into(),
59+
FileName::Custom(format!("<jsx-config-{name}.js>")).into(),
6060
src
6161
);
6262

@@ -1457,7 +1457,7 @@ fn jsx_text_to_str(t: Atom) -> Atom {
14571457
} else {
14581458
Cow::Borrowed(line.trim_end_matches(' '))
14591459
};
1460-
if line.len() == 0 {
1460+
if line.is_empty() {
14611461
continue;
14621462
}
14631463
if i != 0 && !buf.is_empty() {

src/refresh/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enum Persist {
3939
fn get_persistent_id(ident: &Ident) -> Persist {
4040
if ident.sym.starts_with(|c: char| c.is_ascii_uppercase()) {
4141
if cfg!(debug_assertions) && ident.ctxt == SyntaxContext::empty() {
42-
panic!("`{}` should be resolved", ident)
42+
panic!("`{ident}` should be resolved")
4343
}
4444
Persist::Component(ident.clone())
4545
} else {

src/refresh/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn assert_hygiene(e: &Expr) {
3737

3838
if let Expr::Ident(i) = e {
3939
if i.ctxt == SyntaxContext::empty() {
40-
panic!("`{}` should be resolved", i)
40+
panic!("`{i}` should be resolved")
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)