aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-06-09 20:39:42 +0100
committerEdwin Cheng <[email protected]>2019-06-09 20:39:42 +0100
commit9ded8d2eabfbe49fe59788d3d9e05e07f10d52ec (patch)
tree3c2b76839143a012124b113ea1807fe3f5ad09c5 /crates
parente91bf0bba4d0611af81b17430a975656e96006c6 (diff)
Formating
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)