Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
impl Peekable for std::iter::Peekable
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed May 20, 2020
1 parent a1ed0f1 commit aba0e76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lex/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ impl Peekable for FileProcessor {
}
}

impl<T: Iterator> Peekable for std::iter::Peekable<T> {
fn peek(&mut self) -> Option<&Self::Item> {
self.peek()
}
}

pub struct MacroReplacer<I: Iterator<Item = CppResult<Token>>> {
/// The ids seen while replacing the current token.
///
Expand Down

0 comments on commit aba0e76

Please sign in to comment.