diff options
author | cynecx <[email protected]> | 2021-03-26 17:30:59 +0000 |
---|---|---|
committer | cynecx <[email protected]> | 2021-03-26 17:30:59 +0000 |
commit | 5ff3299dd61ea5c5790c01819994c9d8fa6afc09 (patch) | |
tree | e691982730fe01802f874066927b2ebbe8badc75 /crates/ide/src/diagnostics | |
parent | 4ecaad98e074c42dbf637a11afcb630aafffd7b3 (diff) |
syntax: return owned string instead of leaking string
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 2f840909c..5fb3e2d91 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -210,7 +210,7 @@ fn missing_record_expr_field_fix( | |||
210 | } | 210 | } |
211 | let new_field = make::record_field( | 211 | let new_field = make::record_field( |
212 | None, | 212 | None, |
213 | make::name(record_expr_field.field_name()?.text()), | 213 | make::name(&record_expr_field.field_name()?.text()), |
214 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), | 214 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), |
215 | ); | 215 | ); |
216 | 216 | ||