Remove dead code

This commit is contained in:
Aleksey Kladov 2020-04-10 15:54:05 +02:00
parent 4560fe2abf
commit e0f02d233f
5 changed files with 191 additions and 206 deletions

View file

@ -90,7 +90,7 @@ mod support {
AstChildren::new(parent)
}
pub(super) fn token2(parent: &SyntaxNode, kind: SyntaxKind) -> Option<SyntaxToken> {
pub(super) fn token(parent: &SyntaxNode, kind: SyntaxKind) -> Option<SyntaxToken> {
parent.children_with_tokens().filter_map(|it| it.into_token()).find(|it| it.kind() == kind)
}
}

View file

@ -343,7 +343,7 @@ impl ast::TypeBound {
.skip_while(|it| it.kind() != T![const])
.find(|it| it.kind() == T![?])
} else {
support::token2(&self.syntax, T![?])
support::token(&self.syntax, T![?])
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -65,7 +65,7 @@ pub trait TypeBoundsOwner: AstNode {
}
fn colon_token(&self) -> Option<SyntaxToken> {
support::token2(self.syntax(), T![:])
support::token(self.syntax(), T![:])
}
}