Make ModPath display escaped path
This commit is contained in:
@@ -73,7 +73,7 @@ fn render(
|
||||
None => (name.clone().into(), name.into(), false),
|
||||
};
|
||||
let (qualified_name, escaped_qualified_name) =
|
||||
(qualified_name.to_string(), qualified_name.escaped().to_string());
|
||||
(qualified_name.unescaped().to_string(), qualified_name.to_string());
|
||||
let snippet_cap = ctx.snippet_cap();
|
||||
|
||||
let mut rendered = match kind {
|
||||
|
||||
@@ -53,7 +53,7 @@ pub(crate) fn render_variant_pat(
|
||||
let (visible_fields, fields_omitted) = visible_fields(ctx.completion, &fields, variant)?;
|
||||
|
||||
let (name, escaped_name) = match path {
|
||||
Some(path) => (path.to_string().into(), path.escaped().to_string().into()),
|
||||
Some(path) => (path.unescaped().to_string().into(), path.to_string().into()),
|
||||
None => {
|
||||
let name = local_name.unwrap_or_else(|| variant.name(ctx.db()));
|
||||
(name.unescaped().to_smol_str(), name.to_smol_str())
|
||||
|
||||
@@ -21,7 +21,7 @@ pub(crate) fn render_union_literal(
|
||||
let name = local_name.unwrap_or_else(|| un.name(ctx.db()));
|
||||
|
||||
let (qualified_name, escaped_qualified_name) = match path {
|
||||
Some(p) => (p.to_string(), p.escaped().to_string()),
|
||||
Some(p) => (p.unescaped().to_string(), p.to_string()),
|
||||
None => (name.unescaped().to_string(), name.to_string()),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user