mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
syntax: return owned string instead of leaking string
This commit is contained in:
parent
4ecaad98e0
commit
5ff3299dd6
16 changed files with 27 additions and 27 deletions
|
@ -509,7 +509,7 @@ impl ImportGroup {
|
|||
PathSegmentKind::SelfKw => ImportGroup::ThisModule,
|
||||
PathSegmentKind::SuperKw => ImportGroup::SuperModule,
|
||||
PathSegmentKind::CrateKw => ImportGroup::ThisCrate,
|
||||
PathSegmentKind::Name(name) => match name.text() {
|
||||
PathSegmentKind::Name(name) => match name.text().as_str() {
|
||||
"std" => ImportGroup::Std,
|
||||
"core" => ImportGroup::Std,
|
||||
_ => ImportGroup::ExternCrate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue