aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/typing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/src/typing.rs')
-rw-r--r--crates/libeditor/src/typing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/libeditor/src/typing.rs b/crates/libeditor/src/typing.rs
index cc0d3d272..8903af177 100644
--- a/crates/libeditor/src/typing.rs
+++ b/crates/libeditor/src/typing.rs
@@ -1,5 +1,5 @@
1use libsyntax2::{ 1use libsyntax2::{
2 TextUnit, TextRange, SyntaxNodeRef, 2 TextUnit, TextRange, SyntaxNodeRef, ParsedFile,
3 ast, 3 ast,
4 algo::{ 4 algo::{
5 walk::preorder, 5 walk::preorder,
@@ -11,7 +11,7 @@ use libsyntax2::{
11 11
12use {ActionResult, EditBuilder}; 12use {ActionResult, EditBuilder};
13 13
14pub fn join_lines(file: &ast::ParsedFile, range: TextRange) -> ActionResult { 14pub fn join_lines(file: &ParsedFile, range: TextRange) -> ActionResult {
15 let range = if range.is_empty() { 15 let range = if range.is_empty() {
16 let text = file.syntax().text(); 16 let text = file.syntax().text();
17 let text = &text[TextRange::from_to(range.start(), TextUnit::of_str(&text))]; 17 let text = &text[TextRange::from_to(range.start(), TextUnit::of_str(&text))];