diff options
author | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
commit | 12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch) | |
tree | 71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_ide_api_light/src/structure.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_ide_api_light/src/structure.rs')
-rw-r--r-- | crates/ra_ide_api_light/src/structure.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/ra_ide_api_light/src/structure.rs b/crates/ra_ide_api_light/src/structure.rs index 330a3694c..75afd1181 100644 --- a/crates/ra_ide_api_light/src/structure.rs +++ b/crates/ra_ide_api_light/src/structure.rs | |||
@@ -70,10 +70,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> { | |||
70 | node_range: node.syntax().range(), | 70 | node_range: node.syntax().range(), |
71 | kind: node.syntax().kind(), | 71 | kind: node.syntax().kind(), |
72 | detail, | 72 | detail, |
73 | deprecated: node | 73 | deprecated: node.attrs().filter_map(|x| x.as_named()).any(|x| x == "deprecated"), |
74 | .attrs() | ||
75 | .filter_map(|x| x.as_named()) | ||
76 | .any(|x| x == "deprecated"), | ||
77 | }) | 74 | }) |
78 | } | 75 | } |
79 | 76 | ||
@@ -123,11 +120,9 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> { | |||
123 | let target_trait = im.target_trait(); | 120 | let target_trait = im.target_trait(); |
124 | let label = match target_trait { | 121 | let label = match target_trait { |
125 | None => format!("impl {}", target_type.syntax().text()), | 122 | None => format!("impl {}", target_type.syntax().text()), |
126 | Some(t) => format!( | 123 | Some(t) => { |
127 | "impl {} for {}", | 124 | format!("impl {} for {}", t.syntax().text(), target_type.syntax().text(),) |
128 | t.syntax().text(), | 125 | } |
129 | target_type.syntax().text(), | ||
130 | ), | ||
131 | }; | 126 | }; |
132 | 127 | ||
133 | let node = StructureNode { | 128 | let node = StructureNode { |