diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-19 17:08:17 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-19 17:08:17 +0100 |
commit | f697d27c31ba4486b9711893a93505a05319a2dc (patch) | |
tree | 9c7996d6ac7323da527fb53171b9275545d1640a /crates/ra_ide_api/src/join_lines.rs | |
parent | 7bc9dec7cf195bc73a88d7c740f9d0bed1019e98 (diff) | |
parent | 191a6ba330bd47fc3b9cc05d59b2d456b471eb89 (diff) |
Merge #1554
1554: convenience api r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
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, |