diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 18:04:34 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 18:12:06 +0100 |
commit | c9cfd57eeaa53657c0af7b9c4ba74d6b7b9889ed (patch) | |
tree | 422c1d8fb7f8af663df3c6c6183783253692acad /crates/ra_ide_api/src/display/short_label.rs | |
parent | 7bde8012cb28c44de7ffc779003781d385323808 (diff) |
switch to upstream rowan's API
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) |