Skip to content

Commit

Permalink
Fixed borrow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zesterer committed Oct 19, 2024
1 parent f91f895 commit bb55020
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/combinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ where
let res = self.parser.go::<M>(inp);

if res.is_err() {
inp.memos.insert(key, Some(inp.take_alt()));
let alt = inp.take_alt();
inp.memos.insert(key, Some(alt));
} else {
inp.memos.remove(&key);
}
Expand Down

0 comments on commit bb55020

Please sign in to comment.