summaryrefslogtreecommitdiff
path: root/crates/typst-syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-syntax/src')
-rw-r--r--crates/typst-syntax/src/node.rs4
-rw-r--r--crates/typst-syntax/src/parser.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/typst-syntax/src/node.rs b/crates/typst-syntax/src/node.rs
index 14ad018f..b7e1809d 100644
--- a/crates/typst-syntax/src/node.rs
+++ b/crates/typst-syntax/src/node.rs
@@ -767,7 +767,7 @@ impl<'a> LinkedNode<'a> {
}
/// Access to parents and siblings.
-impl<'a> LinkedNode<'a> {
+impl LinkedNode<'_> {
/// Get this node's parent.
pub fn parent(&self) -> Option<&Self> {
self.parent.as_deref()
@@ -825,7 +825,7 @@ pub enum Side {
}
/// Access to leaves.
-impl<'a> LinkedNode<'a> {
+impl LinkedNode<'_> {
/// Get the rightmost non-trivia leaf before this node.
pub fn prev_leaf(&self) -> Option<Self> {
let mut node = self.clone();
diff --git a/crates/typst-syntax/src/parser.rs b/crates/typst-syntax/src/parser.rs
index ea5b9155..e087f9dd 100644
--- a/crates/typst-syntax/src/parser.rs
+++ b/crates/typst-syntax/src/parser.rs
@@ -1911,7 +1911,7 @@ struct PartialState {
}
/// The Memoization interface.
-impl<'s> Parser<'s> {
+impl Parser<'_> {
/// Store the already parsed nodes and the parser state into the memo map by
/// extending the arena and storing the extended range and a checkpoint.
fn memoize_parsed_nodes(&mut self, key: MemoKey, prev_len: usize) {
@@ -1967,7 +1967,7 @@ impl<'s> Parser<'s> {
/// Functions for eating expected or unexpected tokens and generating errors if
/// we don't get what we expect.
-impl<'s> Parser<'s> {
+impl Parser<'_> {
/// Consume the given `kind` or produce an error.
fn expect(&mut self, kind: SyntaxKind) -> bool {
let at = self.at(kind);