Skip to content

Commit

Permalink
No need for runtime borrow checking in Lookahead1::error
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 18, 2024
1 parent c7d6247 commit 68d3456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lookahead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<'a> Lookahead1<'a> {
/// The error message will identify all of the expected token types that
/// have been peeked against this lookahead instance.
pub fn error(self) -> Error {
let comparisons = self.comparisons.borrow();
let comparisons = self.comparisons.into_inner();
match comparisons.len() {
0 => {
if self.cursor.eof() {
Expand Down

0 comments on commit 68d3456

Please sign in to comment.