aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/typing.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-25 09:40:17 +0100
committerAleksey Kladov <[email protected]>2018-08-25 09:40:17 +0100
commit9fae494a8da347a32cdcd3dcd714ba00aaff9664 (patch)
tree9fe4fb51c374d036e22d5a60ce50b63dbe287142 /crates/libeditor/src/typing.rs
parentf104458d45e30024f8a4a02c1ad4101ed74b08f9 (diff)
Move ParsedFile to top
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))];