From b1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Apr 2020 23:40:41 +0200 Subject: Convert code to text-size --- crates/ra_assists/src/handlers/change_visibility.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src/handlers/change_visibility.rs') 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::{ ATTR, COMMENT, CONST_DEF, ENUM_DEF, FN_DEF, MODULE, STRUCT_DEF, TRAIT_DEF, VISIBILITY, WHITESPACE, }, - SyntaxNode, TextUnit, T, + SyntaxNode, TextSize, T, }; use crate::{Assist, AssistCtx, AssistId}; @@ -67,7 +67,7 @@ fn add_vis(ctx: AssistCtx) -> Option { }) } -fn vis_offset(node: &SyntaxNode) -> TextUnit { +fn vis_offset(node: &SyntaxNode) -> TextSize { node.children_with_tokens() .skip_while(|it| match it.kind() { WHITESPACE | COMMENT | ATTR => true, -- cgit v1.2.3