aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/extend_selection.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs
index 9b6bbe82d..70b6fde82 100644
--- a/crates/ra_ide/src/extend_selection.rs
+++ b/crates/ra_ide/src/extend_selection.rs
@@ -171,14 +171,11 @@ fn extend_tokens_from_range(
171 } 171 }
172} 172}
173 173
174fn skip_whitespace( 174fn skip_whitespace(mut token: SyntaxToken, direction: Direction) -> Option<SyntaxToken> {
175 mut token: SyntaxToken,
176 direction: Direction,
177) -> Option<SyntaxToken> {
178 while token.kind() == WHITESPACE { 175 while token.kind() == WHITESPACE {
179 token = match direction { 176 token = match direction {
180 Direction::Next => token.next_token()?, 177 Direction::Next => token.next_token()?,
181 Direction::Prev => token.prev_token()?, 178 Direction::Prev => token.prev_token()?,
182 } 179 }
183 } 180 }
184 Some(token) 181 Some(token)