diff options
author | Aleksey Kladov <[email protected]> | 2019-07-19 17:05:34 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-19 17:05:34 +0100 |
commit | 191a6ba330bd47fc3b9cc05d59b2d456b471eb89 (patch) | |
tree | 9c7996d6ac7323da527fb53171b9275545d1640a /crates/ra_ide_api/src/join_lines.rs | |
parent | a6df224f7d3893f5a742b58818eac6c5a953721d (diff) |
convenience api
Diffstat (limited to 'crates/ra_ide_api/src/join_lines.rs')
-rw-r--r-- | crates/ra_ide_api/src/join_lines.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/join_lines.rs b/crates/ra_ide_api/src/join_lines.rs index 50bcfb5b7..9b81ad9e4 100644 --- a/crates/ra_ide_api/src/join_lines.rs +++ b/crates/ra_ide_api/src/join_lines.rs | |||
@@ -27,7 +27,7 @@ pub fn join_lines(file: &SourceFile, range: TextRange) -> TextEdit { | |||
27 | SyntaxElement::Token(token) => token.parent(), | 27 | SyntaxElement::Token(token) => token.parent(), |
28 | }; | 28 | }; |
29 | let mut edit = TextEditBuilder::default(); | 29 | let mut edit = TextEditBuilder::default(); |
30 | for token in node.descendants_with_tokens().filter_map(|it| it.as_token().cloned()) { | 30 | for token in node.descendants_with_tokens().filter_map(|it| it.into_token()) { |
31 | let range = match range.intersection(&token.range()) { | 31 | let range = match range.intersection(&token.range()) { |
32 | Some(range) => range, | 32 | Some(range) => range, |
33 | None => continue, | 33 | None => continue, |