mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Hide implementation details of TokenText
This commit is contained in:
parent
d9b4ac8128
commit
0a156c80af
2 changed files with 20 additions and 8 deletions
|
@ -40,8 +40,8 @@ fn text_of_first_token(node: &SyntaxNode) -> TokenText<'_> {
|
|||
}
|
||||
|
||||
match node.green() {
|
||||
Cow::Borrowed(green_ref) => TokenText::Borrowed(first_token(green_ref).text()),
|
||||
Cow::Owned(green) => TokenText::Owned(first_token(&green).to_owned()),
|
||||
Cow::Borrowed(green_ref) => TokenText::borrowed(first_token(green_ref).text()),
|
||||
Cow::Owned(green) => TokenText::owned(first_token(&green).to_owned()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue