Skip to content

Commit 97e5f9c

Browse files
committed
refactor(transform/styled-components): rename var (#12283)
Follow-on after #12256. Nit! Rename var to a name which reflects what the var *means*, rather than the implementation detail.
1 parent 6094099 commit 97e5f9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/oxc_transformer/src/plugins/styled_components.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ fn minify_template_literal<'a>(lit: &mut TemplateLiteral<'a>, ast: AstBuilder<'a
888888
// Parentheses depth. `((x)` -> 1, `(x))` -> -1.
889889
let mut paren_depth: isize = 0;
890890
// `true` if some quasis and expressions need to be deleted.
891-
let mut has_remove_sentinel = false;
891+
let mut delete_some = false;
892892

893893
// Current minified quasi being built
894894
let mut output = Vec::new();
@@ -920,7 +920,7 @@ fn minify_template_literal<'a>(lit: &mut TemplateLiteral<'a>, ast: AstBuilder<'a
920920
quasis[quasi_index - 1].span = REMOVE_SENTINEL;
921921
quasi_index += 1;
922922

923-
has_remove_sentinel = true;
923+
delete_some = true;
924924

925925
// Find end of comment
926926
let start_index = if is_block_comment {
@@ -1094,7 +1094,7 @@ fn minify_template_literal<'a>(lit: &mut TemplateLiteral<'a>, ast: AstBuilder<'a
10941094
quasis.last_mut().unwrap().value.raw = ast.atom(output_str);
10951095

10961096
// Remove quasis that are marked for removal, and the expressions following them
1097-
if has_remove_sentinel {
1097+
if delete_some {
10981098
let mut quasis_iter = quasis.iter();
10991099
// TODO: Remove scopes, symbols, and references for removed `Expression`.
11001100
expressions.retain(|_| quasis_iter.next().unwrap().span != REMOVE_SENTINEL);

0 commit comments

Comments
 (0)