Convert code to text-size

This commit is contained in:
Aleksey Kladov 2020-04-24 23:40:41 +02:00
parent 27a7718880
commit b1d5817dd1
75 changed files with 438 additions and 456 deletions

View file

@ -60,7 +60,7 @@ use ra_ide_db::{
symbol_index::{self, FileSymbol},
LineIndexDatabase,
};
use ra_syntax::{SourceFile, TextRange, TextUnit};
use ra_syntax::{SourceFile, TextRange, TextSize};
use crate::display::ToNav;
@ -265,7 +265,7 @@ impl Analysis {
/// Returns position of the matching brace (all types of braces are
/// supported).
pub fn matching_brace(&self, position: FilePosition) -> Cancelable<Option<TextUnit>> {
pub fn matching_brace(&self, position: FilePosition) -> Cancelable<Option<TextSize>> {
self.with_db(|db| {
let parse = db.parse(position.file_id);
let file = parse.tree();