diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-21 14:48:46 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-21 14:48:46 +0100 |
commit | 443061e75260e55bbaa741c5c85377b8d5c57e47 (patch) | |
tree | c28241dc1639480ba5154040e9f31384eabfed06 /crates/ra_ide_api/src/display | |
parent | 1137fc47bbbc8d648db3bc669e41fd059a09dd1d (diff) | |
parent | 773ad2edb3b84bf20378a577bc4cd808384de078 (diff) |
Merge #1570
1570: switch to upstream rowan's API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/display')
-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) |