diff options
Diffstat (limited to 'crates/ide/src/display/short_label.rs')
-rw-r--r-- | crates/ide/src/display/short_label.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/display/short_label.rs b/crates/ide/src/display/short_label.rs index 990f740b8..b8e4cc181 100644 --- a/crates/ide/src/display/short_label.rs +++ b/crates/ide/src/display/short_label.rs | |||
@@ -90,7 +90,7 @@ impl ShortLabel for ast::Variant { | |||
90 | impl ShortLabel for ast::ConstParam { | 90 | impl ShortLabel for ast::ConstParam { |
91 | fn short_label(&self) -> Option<String> { | 91 | fn short_label(&self) -> Option<String> { |
92 | let mut buf = "const ".to_owned(); | 92 | let mut buf = "const ".to_owned(); |
93 | buf.push_str(self.name()?.text().as_str()); | 93 | buf.push_str(self.name()?.text()); |
94 | if let Some(type_ref) = self.ty() { | 94 | if let Some(type_ref) = self.ty() { |
95 | format_to!(buf, ": {}", type_ref.syntax()); | 95 | format_to!(buf, ": {}", type_ref.syntax()); |
96 | } | 96 | } |
@@ -117,6 +117,6 @@ where | |||
117 | { | 117 | { |
118 | let mut buf = node.visibility().map(|v| format!("{} ", v.syntax())).unwrap_or_default(); | 118 | let mut buf = node.visibility().map(|v| format!("{} ", v.syntax())).unwrap_or_default(); |
119 | buf.push_str(label); | 119 | buf.push_str(label); |
120 | buf.push_str(node.name()?.text().as_str()); | 120 | buf.push_str(node.name()?.text()); |
121 | Some(buf) | 121 | Some(buf) |
122 | } | 122 | } |