diff options
author | Kirill Bulatov <[email protected]> | 2019-07-21 22:10:29 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2019-07-21 22:10:29 +0100 |
commit | 31aef808d96b779dbc8ce41e27857965e79bd96f (patch) | |
tree | 254d69a1ec3abe6d70b2dd9737ef699f33f88f62 /crates/ra_ide_api/src/display/short_label.rs | |
parent | ba76017d2eb1b7606106c15478ac658dc32b6dbd (diff) | |
parent | d690249bc81bc265cb3d1836c2922325f4fdb8af (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.rs | 5 |
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 @@ | |||
1 | use std::fmt::Write; | 1 | use format_buf::format; |
2 | |||
3 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; | 2 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; |
4 | 3 | ||
5 | pub(crate) trait ShortLabel { | 4 | pub(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) |