mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 03:14:30 +00:00
Imrove fn name computation in Generate function
This commit is contained in:
parent
726a2aa211
commit
4dc33140a3
2 changed files with 30 additions and 13 deletions
|
@ -21,9 +21,9 @@ impl<'a> TokenText<'a> {
|
|||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
match self.0 {
|
||||
Repr::Borrowed(it) => it,
|
||||
Repr::Owned(ref green) => green.text(),
|
||||
match &self.0 {
|
||||
&Repr::Borrowed(it) => it,
|
||||
Repr::Owned(green) => green.text(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue