Skip to content

Commit

Permalink
Remove unnecessary variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed Jun 3, 2024
1 parent ba7da28 commit 2f9d8f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ impl<'a> FMatcher<'a> {
ptn_lines_off += 1;
let mut ptn_lines_sub = ptn_lines.clone();
let mut ptnl_sub = ptnl;
let mut ptn_lines_off_sub = ptn_lines_off;
let mut text_lines_sub = text_lines.clone();
let mut text_lines_off_sub = text_lines_off;
let mut textl_sub = textl;
Expand All @@ -314,7 +313,6 @@ impl<'a> FMatcher<'a> {
// We've matched everything successfully
ptn_lines = ptn_lines_sub;
ptnl = ptnl_sub;
ptn_lines_off = ptn_lines_off_sub;
text_lines = text_lines_sub;
textl = textl_sub;
text_lines_off = text_lines_off_sub;
Expand Down Expand Up @@ -347,15 +345,15 @@ impl<'a> FMatcher<'a> {
(Some(x), Some(y)) => {
if self.match_line(&mut names_sub, x, y) {
ptnl_sub = ptn_lines_sub.next();
ptn_lines_off_sub += 1;
ptn_lines_off += 1;
textl_sub = text_lines_sub.next();
text_lines_off_sub += 1;
} else {
// We failed to match, so we need to reset the
// pattern, but advance the text.
ptn_lines_sub = ptn_lines.clone();
ptnl_sub = ptnl;
ptn_lines_off_sub = ptn_lines_off_orig;
ptn_lines_off = ptn_lines_off_orig;
textl_sub = text_lines.next();
text_lines_off += 1;
text_lines_sub = text_lines.clone();
Expand Down

0 comments on commit 2f9d8f2

Please sign in to comment.