Merge commit 'aa9bc86125' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2023-06-05 12:04:23 +03:00
parent 1570299af4
commit c48062fe2a
598 changed files with 57696 additions and 17615 deletions

View file

@ -3,6 +3,7 @@
use std::{cmp::Ordering, fmt, ops};
use rowan::GreenToken;
use smol_str::SmolStr;
pub struct TokenText<'a>(pub(crate) Repr<'a>);
@ -47,6 +48,12 @@ impl From<TokenText<'_>> for String {
}
}
impl From<TokenText<'_>> for SmolStr {
fn from(token_text: TokenText<'_>) -> Self {
SmolStr::new(token_text.as_str())
}
}
impl PartialEq<&'_ str> for TokenText<'_> {
fn eq(&self, other: &&str) -> bool {
self.as_str() == *other