Skip to content

Commit

Permalink
appease rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mmirate authored Dec 23, 2024
1 parent b308817 commit 988c405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regex-syntax/src/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3103,7 +3103,7 @@ fn lift_common_suffix(hirs: Vec<Hir>) -> Result<Vec<Hir>, Vec<Hir>> {
.zip(concat.iter().rev())
.take_while(|(x, y)| x == y)
.count();
suffix = &suffix[suffix.len()-common_len..];
suffix = &suffix[suffix.len() - common_len..];
if suffix.is_empty() {
return Err(hirs);
}
Expand All @@ -3120,7 +3120,7 @@ fn lift_common_suffix(hirs: Vec<Hir>) -> Result<Vec<Hir>, Vec<Hir>> {
// have a concat.
_ => unreachable!(),
};
let suffix = concat.split_off(concat.len()-len);
let suffix = concat.split_off(concat.len() - len);
prefix_alts.push(Hir::concat(concat));
if suffix_concat.is_empty() {
suffix_concat = suffix;
Expand Down

0 comments on commit 988c405

Please sign in to comment.