aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/display/short_label.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2019-07-21 22:10:29 +0100
committerKirill Bulatov <[email protected]>2019-07-21 22:10:29 +0100
commit31aef808d96b779dbc8ce41e27857965e79bd96f (patch)
tree254d69a1ec3abe6d70b2dd9737ef699f33f88f62 /crates/ra_ide_api/src/display/short_label.rs
parentba76017d2eb1b7606106c15478ac658dc32b6dbd (diff)
parentd690249bc81bc265cb3d1836c2922325f4fdb8af (diff)
Merge branch 'master' into add-type-lenses
Diffstat (limited to 'crates/ra_ide_api/src/display/short_label.rs')
-rw-r--r--crates/ra_ide_api/src/display/short_label.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/display/short_label.rs b/crates/ra_ide_api/src/display/short_label.rs
index be499e485..825a033ee 100644
--- a/crates/ra_ide_api/src/display/short_label.rs
+++ b/crates/ra_ide_api/src/display/short_label.rs
@@ -1,5 +1,4 @@
1use std::fmt::Write; 1use format_buf::format;
2
3use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; 2use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner};
4 3
5pub(crate) trait ShortLabel { 4pub(crate) trait ShortLabel {
@@ -73,7 +72,7 @@ where
73 let mut buf = short_label_from_node(node, prefix)?; 72 let mut buf = short_label_from_node(node, prefix)?;
74 73
75 if let Some(type_ref) = node.ascribed_type() { 74 if let Some(type_ref) = node.ascribed_type() {
76 write!(buf, ": {}", type_ref.syntax()).unwrap(); 75 format!(buf, ": {}", type_ref.syntax());
77 } 76 }
78 77
79 Some(buf) 78 Some(buf)