Skip to content

Commit e537b3d

Browse files
[autofix.ci] apply automated fixes
1 parent 2d6b909 commit e537b3d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

crates/oxc_linter/src/rules/react/jsx_curly_brace_presence.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ fn build_missing_curly_fix_context_for_part(
729729
let first_char_index = mat.start();
730730
let text = part.split_at(first_char_index).1;
731731
let new_start = span.start + part_start + u32::try_from(first_char_index).unwrap();
732-
let span_from_first_char = Span::new(new_start, new_start + u32::try_from(text.len()).unwrap());
732+
let span_from_first_char =
733+
Span::new(new_start, new_start + u32::try_from(text.len()).unwrap());
733734
(span_from_first_char, text)
734735
})
735736
}
@@ -738,15 +739,21 @@ fn calculate_line_start(line_matches: &[usize], index: usize) -> u32 {
738739
if index == 0 {
739740
0u32
740741
} else {
741-
u32::try_from(line_matches.get(index - 1).map_or(1usize, |new_line_index| *new_line_index + 1)).unwrap()
742+
u32::try_from(
743+
line_matches.get(index - 1).map_or(1usize, |new_line_index| *new_line_index + 1),
744+
)
745+
.unwrap()
742746
}
743747
}
744748

745749
fn calculate_part_start(line_matches: &[usize], index: usize) -> u32 {
746750
if index == 0 {
747751
0u32
748752
} else {
749-
u32::try_from(line_matches.get(index - 1).copied().map_or(0usize, |new_line_index| new_line_index)).unwrap()
753+
u32::try_from(
754+
line_matches.get(index - 1).copied().map_or(0usize, |new_line_index| new_line_index),
755+
)
756+
.unwrap()
750757
}
751758
}
752759

0 commit comments

Comments
 (0)