From a261a1836ba02a1c091c5165795dc165ca399a87 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Oct 2018 17:07:12 +0300 Subject: Move to rowan for syntax tree impl --- crates/ra_syntax/src/reparsing.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax/src/reparsing.rs') diff --git a/crates/ra_syntax/src/reparsing.rs b/crates/ra_syntax/src/reparsing.rs index da44913c5..e3c200d1e 100644 --- a/crates/ra_syntax/src/reparsing.rs +++ b/crates/ra_syntax/src/reparsing.rs @@ -1,11 +1,11 @@ use algo; use grammar; use lexer::{tokenize, Token}; -use text_unit::{TextRange, TextUnit}; -use yellow::{self, SyntaxNodeRef, GreenNode, SyntaxError}; +use yellow::{self, GreenNode, SyntaxNodeRef, SyntaxError}; use parser_impl; use parser_api::Parser; use { + TextUnit, TextRange, SyntaxKind::*, }; use text_utils::replace_range; @@ -65,7 +65,7 @@ fn reparse_leaf<'node>( return None; } - let green = GreenNode::new_leaf(node.kind(), &text); + let green = GreenNode::new_leaf(node.kind(), text.into()); let new_errors = vec![]; Some((node, green, new_errors)) } @@ -340,4 +340,4 @@ enum Foo { } ", "Clone"); } -} \ No newline at end of file +} -- cgit v1.2.3