Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Sep 3, 2024
1 parent 4ea0d1f commit f9a67d8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions crates/oxc_regular_expression/src/body_parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1954,8 +1954,9 @@ impl<'a> PatternParser<'a> {
let checkpoint = self.reader.checkpoint();

// HexLeadSurrogate + HexTrailSurrogate
if let Some(lead_surrogate) =
self.consume_fixed_hex_digits(4).filter(|&cp| surroage_pair::is_lead_surrogate(cp))
if let Some(lead_surrogate) = self
.consume_fixed_hex_digits(4)
.filter(|&cp| surroage_pair::is_lead_surrogate(cp))
{
if self.reader.eat2('\\', 'u') {
if let Some(trail_surrogate) = self
Expand All @@ -1972,16 +1973,18 @@ impl<'a> PatternParser<'a> {
self.reader.rewind(checkpoint);

// HexLeadSurrogate
if let Some(lead_surrogate) =
self.consume_fixed_hex_digits(4).filter(|&cp| surroage_pair::is_lead_surrogate(cp))
if let Some(lead_surrogate) = self
.consume_fixed_hex_digits(4)
.filter(|&cp| surroage_pair::is_lead_surrogate(cp))
{
return Ok(Some(lead_surrogate));
}
self.reader.rewind(checkpoint);

// HexTrailSurrogate
if let Some(trail_surrogate) =
self.consume_fixed_hex_digits(4).filter(|&cp| surroage_pair::is_trail_surrogate(cp))
if let Some(trail_surrogate) = self
.consume_fixed_hex_digits(4)
.filter(|&cp| surroage_pair::is_trail_surrogate(cp))
{
return Ok(Some(trail_surrogate));
}
Expand Down

0 comments on commit f9a67d8

Please sign in to comment.