mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove dead code
This commit is contained in:
parent
4560fe2abf
commit
e0f02d233f
5 changed files with 191 additions and 206 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
@ -65,7 +65,7 @@ pub trait TypeBoundsOwner: AstNode {
|
|||
}
|
||||
|
||||
fn colon_token(&self) -> Option<SyntaxToken> {
|
||||
support::token2(self.syntax(), T![:])
|
||||
support::token(self.syntax(), T![:])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue