chore: Fix warnings for Rust 1.89 (#32378)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
4ff41ba62e
commit
72bcb0beb7
32 changed files with 102 additions and 95 deletions
|
@ -72,25 +72,25 @@ impl<'a> MarkdownParser<'a> {
|
|||
self.cursor >= self.tokens.len() - 1
|
||||
}
|
||||
|
||||
fn peek(&self, steps: usize) -> Option<&(Event, Range<usize>)> {
|
||||
fn peek(&self, steps: usize) -> Option<&(Event<'_>, Range<usize>)> {
|
||||
if self.eof() || (steps + self.cursor) >= self.tokens.len() {
|
||||
return self.tokens.last();
|
||||
}
|
||||
return self.tokens.get(self.cursor + steps);
|
||||
}
|
||||
|
||||
fn previous(&self) -> Option<&(Event, Range<usize>)> {
|
||||
fn previous(&self) -> Option<&(Event<'_>, Range<usize>)> {
|
||||
if self.cursor == 0 || self.cursor > self.tokens.len() {
|
||||
return None;
|
||||
}
|
||||
return self.tokens.get(self.cursor - 1);
|
||||
}
|
||||
|
||||
fn current(&self) -> Option<&(Event, Range<usize>)> {
|
||||
fn current(&self) -> Option<&(Event<'_>, Range<usize>)> {
|
||||
return self.peek(0);
|
||||
}
|
||||
|
||||
fn current_event(&self) -> Option<&Event> {
|
||||
fn current_event(&self) -> Option<&Event<'_>> {
|
||||
return self.current().map(|(event, _)| event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue