diff options
Diffstat (limited to 'crates/ra_assists/src/handlers/fix_visibility.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/fix_visibility.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_assists/src/handlers/fix_visibility.rs b/crates/ra_assists/src/handlers/fix_visibility.rs index 54601d1f3..02763c5b9 100644 --- a/crates/ra_assists/src/handlers/fix_visibility.rs +++ b/crates/ra_assists/src/handlers/fix_visibility.rs | |||
@@ -179,11 +179,7 @@ fn target_data_for_def( | |||
179 | 179 | ||
180 | fn vis_offset(node: &SyntaxNode) -> TextSize { | 180 | fn vis_offset(node: &SyntaxNode) -> TextSize { |
181 | node.children_with_tokens() | 181 | node.children_with_tokens() |
182 | .skip_while(|it| match it.kind() { | 182 | .find(|it| !matches!(it.kind(), WHITESPACE | COMMENT | ATTR)) |
183 | WHITESPACE | COMMENT | ATTR => true, | ||
184 | _ => false, | ||
185 | }) | ||
186 | .next() | ||
187 | .map(|it| it.text_range().start()) | 183 | .map(|it| it.text_range().start()) |
188 | .unwrap_or_else(|| node.text_range().start()) | 184 | .unwrap_or_else(|| node.text_range().start()) |
189 | } | 185 | } |