Run cargo fix --edition-idioms

This commit is contained in:
Amos Wenger 2022-07-20 15:02:08 +02:00
parent 23d25a3094
commit 816f7fe12a
230 changed files with 888 additions and 888 deletions

View file

@ -259,7 +259,7 @@ impl Marker {
/// Finishes the syntax tree node and assigns `kind` to it,
/// and mark the create a `CompletedMarker` for possible future
/// operation like `.precede()` to deal with forward_parent.
pub(crate) fn complete(mut self, p: &mut Parser, kind: SyntaxKind) -> CompletedMarker {
pub(crate) fn complete(mut self, p: &mut Parser<'_>, kind: SyntaxKind) -> CompletedMarker {
self.bomb.defuse();
let idx = self.pos as usize;
match &mut p.events[idx] {
@ -274,7 +274,7 @@ impl Marker {
/// Abandons the syntax tree node. All its children
/// are attached to its parent instead.
pub(crate) fn abandon(mut self, p: &mut Parser) {
pub(crate) fn abandon(mut self, p: &mut Parser<'_>) {
self.bomb.defuse();
let idx = self.pos as usize;
if idx == p.events.len() - 1 {
@ -309,7 +309,7 @@ impl CompletedMarker {
/// Append a new `START` events as `[START, FINISH, NEWSTART]`,
/// then mark `NEWSTART` as `START`'s parent with saving its relative
/// distance to `NEWSTART` into forward_parent(=2 in this case);
pub(crate) fn precede(self, p: &mut Parser) -> Marker {
pub(crate) fn precede(self, p: &mut Parser<'_>) -> Marker {
let new_pos = p.start();
let idx = self.pos as usize;
match &mut p.events[idx] {
@ -322,7 +322,7 @@ impl CompletedMarker {
}
/// Extends this completed marker *to the left* up to `m`.
pub(crate) fn extend_to(self, p: &mut Parser, mut m: Marker) -> CompletedMarker {
pub(crate) fn extend_to(self, p: &mut Parser<'_>, mut m: Marker) -> CompletedMarker {
m.bomb.defuse();
let idx = m.pos as usize;
match &mut p.events[idx] {