From a4635a199bc446bd103aa5821e57dc19b8a15751 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 3 Jan 2019 18:59:17 +0300 Subject: more enterprisey assists API --- crates/ra_syntax/src/yellow/syntax_text.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_syntax/src/yellow') diff --git a/crates/ra_syntax/src/yellow/syntax_text.rs b/crates/ra_syntax/src/yellow/syntax_text.rs index 46bde9a08..783dca214 100644 --- a/crates/ra_syntax/src/yellow/syntax_text.rs +++ b/crates/ra_syntax/src/yellow/syntax_text.rs @@ -119,3 +119,9 @@ impl SyntaxTextSlice for ops::Range { TextRange::from_to(self.start, self.end).restrict(range) } } + +impl From> for String { + fn from(text: SyntaxText) -> String { + text.to_string() + } +} -- cgit v1.2.3