aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display/short_label.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/display/short_label.rs')
-rw-r--r--crates/ra_ide/src/display/short_label.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 9ffc9b980..4b081bf6c 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -1,7 +1,7 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use format_buf::format;
4use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; 3use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner};
4use stdx::format_to;
5 5
6pub(crate) trait ShortLabel { 6pub(crate) trait ShortLabel {
7 fn short_label(&self) -> Option<String>; 7 fn short_label(&self) -> Option<String>;
@@ -80,7 +80,7 @@ where
80 let mut buf = short_label_from_node(node, prefix)?; 80 let mut buf = short_label_from_node(node, prefix)?;
81 81
82 if let Some(type_ref) = node.ascribed_type() { 82 if let Some(type_ref) = node.ascribed_type() {
83 format!(buf, ": {}", type_ref.syntax()); 83 format_to!(buf, ": {}", type_ref.syntax());
84 } 84 }
85 85
86 Some(buf) 86 Some(buf)