Hide implementation details of TokenText

This commit is contained in:
Dawer 2021-05-06 10:07:06 +05:00
parent d9b4ac8128
commit 0a156c80af
2 changed files with 20 additions and 8 deletions

View file

@ -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()),
}
}