aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide_api/src/display/short_label.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/display/short_label.rs b/crates/ra_ide_api/src/display/short_label.rs
index ab67cc90c..dc8245c34 100644
--- a/crates/ra_ide_api/src/display/short_label.rs
+++ b/crates/ra_ide_api/src/display/short_label.rs
@@ -84,8 +84,7 @@ fn short_label_from_node<T>(node: &T, label: &str) -> Option<String>
84where 84where
85 T: NameOwner + VisibilityOwner, 85 T: NameOwner + VisibilityOwner,
86{ 86{
87 let mut buf = 87 let mut buf = node.visibility().map(|v| format!("{} ", v.syntax().text())).unwrap_or_default();
88 node.visibility().map(|v| format!("{} ", v.syntax().text())).unwrap_or_default();
89 buf.push_str(label); 88 buf.push_str(label);
90 buf.push_str(node.name()?.text().as_str()); 89 buf.push_str(node.name()?.text().as_str());
91 Some(buf) 90 Some(buf)