aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers/insert_use.rs
diff options
context:
space:
mode:
authorcynecx <[email protected]>2021-03-26 17:30:59 +0000
committercynecx <[email protected]>2021-03-26 17:30:59 +0000
commit5ff3299dd61ea5c5790c01819994c9d8fa6afc09 (patch)
treee691982730fe01802f874066927b2ebbe8badc75 /crates/ide_db/src/helpers/insert_use.rs
parent4ecaad98e074c42dbf637a11afcb630aafffd7b3 (diff)
syntax: return owned string instead of leaking string
Diffstat (limited to 'crates/ide_db/src/helpers/insert_use.rs')
-rw-r--r--crates/ide_db/src/helpers/insert_use.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_db/src/helpers/insert_use.rs b/crates/ide_db/src/helpers/insert_use.rs
index 20c195f82..e681ced80 100644
--- a/crates/ide_db/src/helpers/insert_use.rs
+++ b/crates/ide_db/src/helpers/insert_use.rs
@@ -509,7 +509,7 @@ impl ImportGroup {
509 PathSegmentKind::SelfKw => ImportGroup::ThisModule, 509 PathSegmentKind::SelfKw => ImportGroup::ThisModule,
510 PathSegmentKind::SuperKw => ImportGroup::SuperModule, 510 PathSegmentKind::SuperKw => ImportGroup::SuperModule,
511 PathSegmentKind::CrateKw => ImportGroup::ThisCrate, 511 PathSegmentKind::CrateKw => ImportGroup::ThisCrate,
512 PathSegmentKind::Name(name) => match name.text() { 512 PathSegmentKind::Name(name) => match name.text().as_str() {
513 "std" => ImportGroup::Std, 513 "std" => ImportGroup::Std,
514 "core" => ImportGroup::Std, 514 "core" => ImportGroup::Std,
515 _ => ImportGroup::ExternCrate, 515 _ => ImportGroup::ExternCrate,