mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
remove unnecessary
This commit is contained in:
parent
336909b63a
commit
06c02021a3
4 changed files with 6 additions and 6 deletions
|
@ -62,7 +62,7 @@ function parseSnippet(snip: string): [string, [number, number]] | undefined {
|
|||
const m = snip.match(/\$(0|\{0:([^}]*)\})/);
|
||||
if (!m) return undefined;
|
||||
const placeholder = m[2] ?? "";
|
||||
const range: [number, number] = [m.index!!, placeholder.length];
|
||||
const range: [number, number] = [m.index, placeholder.length];
|
||||
const insert = snip.replace(m[0], placeholder);
|
||||
return [insert, range];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue