diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-28 11:28:31 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-28 11:28:31 +0000 |
commit | c30425dc96895117b644f29b758cee9dac36839b (patch) | |
tree | d3ccef4aa8f681cc9de29f0435ad20e87911a6ba /crates/ra_ide/src/display/short_label.rs | |
parent | a1fea0d34ee8f3436aefd87d4c133a7ff50ffbb0 (diff) | |
parent | 311cbbdad599d51c6f08f7dd72c299f7c0128bb2 (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.rs | 4 |
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 | ||
3 | use format_buf::format; | ||
4 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; | 3 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; |
4 | use stdx::format_to; | ||
5 | 5 | ||
6 | pub(crate) trait ShortLabel { | 6 | pub(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) |