aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display/short_label.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-28 11:28:31 +0000
committerGitHub <[email protected]>2020-03-28 11:28:31 +0000
commitc30425dc96895117b644f29b758cee9dac36839b (patch)
treed3ccef4aa8f681cc9de29f0435ad20e87911a6ba /crates/ra_ide/src/display/short_label.rs
parenta1fea0d34ee8f3436aefd87d4c133a7ff50ffbb0 (diff)
parent311cbbdad599d51c6f08f7dd72c299f7c0128bb2 (diff)
Merge #3753
3753: Introduce stdx crate r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
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)