diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-25 11:16:02 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-25 11:16:02 +0100 |
commit | 29fc409e7fe5b12dcf6bfbcca622d79c4c8fcb72 (patch) | |
tree | e42f7bd1490bca66e0786d5bf2b3194aeaa57a93 /crates/ra_assists/src/handlers/change_visibility.rs | |
parent | 27a7718880d93f55f905da606d108d3b3c682ab4 (diff) | |
parent | e87346950039a54c3f0b02d6056cbb92ca38eb28 (diff) |
Merge #4131
4131: Switch to text-size r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/change_visibility.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/change_visibility.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs index cd6d1ee6c..44f6a1dae 100644 --- a/crates/ra_assists/src/handlers/change_visibility.rs +++ b/crates/ra_assists/src/handlers/change_visibility.rs | |||
@@ -5,7 +5,7 @@ use ra_syntax::{ | |||
5 | ATTR, COMMENT, CONST_DEF, ENUM_DEF, FN_DEF, MODULE, STRUCT_DEF, TRAIT_DEF, VISIBILITY, | 5 | ATTR, COMMENT, CONST_DEF, ENUM_DEF, FN_DEF, MODULE, STRUCT_DEF, TRAIT_DEF, VISIBILITY, |
6 | WHITESPACE, | 6 | WHITESPACE, |
7 | }, | 7 | }, |
8 | SyntaxNode, TextUnit, T, | 8 | SyntaxNode, TextSize, T, |
9 | }; | 9 | }; |
10 | 10 | ||
11 | use crate::{Assist, AssistCtx, AssistId}; | 11 | use crate::{Assist, AssistCtx, AssistId}; |
@@ -67,7 +67,7 @@ fn add_vis(ctx: AssistCtx) -> Option<Assist> { | |||
67 | }) | 67 | }) |
68 | } | 68 | } |
69 | 69 | ||
70 | fn vis_offset(node: &SyntaxNode) -> TextUnit { | 70 | fn vis_offset(node: &SyntaxNode) -> TextSize { |
71 | node.children_with_tokens() | 71 | node.children_with_tokens() |
72 | .skip_while(|it| match it.kind() { | 72 | .skip_while(|it| match it.kind() { |
73 | WHITESPACE | COMMENT | ATTR => true, | 73 | WHITESPACE | COMMENT | ATTR => true, |