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/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_assists/src/lib.rs') diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index ccc95735f..3ffbe4c51 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs @@ -19,7 +19,7 @@ pub mod ast_transform; use ra_db::{FileId, FileRange}; use ra_ide_db::RootDatabase; -use ra_syntax::{TextRange, TextUnit}; +use ra_syntax::{TextRange, TextSize}; use ra_text_edit::TextEdit; pub(crate) use crate::assist_ctx::{Assist, AssistCtx, AssistHandler}; @@ -51,7 +51,7 @@ impl AssistLabel { #[derive(Debug, Clone)] pub struct AssistAction { pub edit: TextEdit, - pub cursor_position: Option, + pub cursor_position: Option, // FIXME: This belongs to `AssistLabel` pub target: Option, pub file: AssistFile, @@ -104,7 +104,7 @@ pub fn resolved_assists(db: &RootDatabase, range: FileRange) -> Vec>(); - a.sort_by_key(|it| it.action.target.map_or(TextUnit::from(!0u32), |it| it.len())); + a.sort_by_key(|it| it.action.target.map_or(TextSize::from(!0u32), |it| it.len())); a } -- cgit v1.2.3