aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-25 09:48:59 +0100
committerAleksey Kladov <[email protected]>2018-08-25 09:48:59 +0100
commita44428fc796cb5afb5b85cd246974e590eef2040 (patch)
tree9ca2dc0586e2177a141419fb0c44610e17d3e8e3 /crates
parent70333c8edfd9fd958ceb5669b578a33a289473fe (diff)
kill more reexports
Diffstat (limited to 'crates')
-rw-r--r--crates/cli/src/main.rs4
-rw-r--r--crates/libeditor/src/lib.rs4
2 files changed, 2 insertions, 6 deletions
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs
index bcb0c9b98..68a531f93 100644
--- a/crates/cli/src/main.rs
+++ b/crates/cli/src/main.rs
@@ -72,7 +72,7 @@ fn main() -> Result<()> {
72 72
73fn file() -> Result<File> { 73fn file() -> Result<File> {
74 let text = read_stdin()?; 74 let text = read_stdin()?;
75 Ok(libeditor::parse(&text)) 75 Ok(File::parse(&text))
76} 76}
77 77
78fn read_stdin() -> Result<String> { 78fn read_stdin() -> Result<String> {
@@ -91,7 +91,7 @@ fn render_test(file: &Path, line: usize) -> Result<(String, String)> {
91 None => bail!("No test found at line {} at {}", line, file.display()), 91 None => bail!("No test found at line {} at {}", line, file.display()),
92 Some((_start_line, test)) => test, 92 Some((_start_line, test)) => test,
93 }; 93 };
94 let file = libeditor::parse(&test.text); 94 let file = File::parse(&test.text);
95 let tree = syntax_tree(&file); 95 let tree = syntax_tree(&file);
96 Ok((test.text, tree)) 96 Ok((test.text, tree))
97} 97}
diff --git a/crates/libeditor/src/lib.rs b/crates/libeditor/src/lib.rs
index da337cca0..a604d1951 100644
--- a/crates/libeditor/src/lib.rs
+++ b/crates/libeditor/src/lib.rs
@@ -51,10 +51,6 @@ pub enum RunnableKind {
51 Bin, 51 Bin,
52} 52}
53 53
54pub fn parse(text: &str) -> File {
55 File::parse(text)
56}
57
58pub fn matching_brace(file: &File, offset: TextUnit) -> Option<TextUnit> { 54pub fn matching_brace(file: &File, offset: TextUnit) -> Option<TextUnit> {
59 const BRACES: &[SyntaxKind] = &[ 55 const BRACES: &[SyntaxKind] = &[
60 L_CURLY, R_CURLY, 56 L_CURLY, R_CURLY,