Skip to content

Commit

Permalink
Apply lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
camchenry committed Sep 21, 2024
1 parent 9bb4155 commit ce39776
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,11 @@ fn get_pattern_replacement<'a>(
return None;
}

let Some(pattern_terms) = reg_exp_literal
let pattern_terms = reg_exp_literal
.regex
.pattern
.as_pattern()
.and_then(|pattern| pattern.body.body.first().map(|it| &it.body))
else {
return None;
};
.and_then(|pattern| pattern.body.body.first().map(|it| &it.body))?;
let is_simple_string = pattern_terms.iter().all(|term| matches!(term, Term::Character(_)));

if !is_simple_string {
Expand Down

0 comments on commit ce39776

Please sign in to comment.