diff options
author | Aleksey Kladov <[email protected]> | 2018-08-01 08:40:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-01 08:40:07 +0100 |
commit | 966e9db2b83802dfb55d55bd3a26e69dced1bbd7 (patch) | |
tree | 6d3bda084eab1221bcad7602aa26a2c307850a72 /cli/src | |
parent | b9189ed2db8cb1934e677a17fcc6282c66306df1 (diff) |
Extract libeditor
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index f6e7e2fed..0044841ed 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs | |||
@@ -52,7 +52,7 @@ fn main() -> Result<()> { | |||
52 | fn parse() -> Result<String> { | 52 | fn parse() -> Result<String> { |
53 | let text = read_stdin()?; | 53 | let text = read_stdin()?; |
54 | let start = Instant::now(); | 54 | let start = Instant::now(); |
55 | let file = libsyntax2::parse(text); | 55 | let file = libsyntax2::parse(&text); |
56 | eprintln!("elapsed {:?}", start.elapsed()); | 56 | eprintln!("elapsed {:?}", start.elapsed()); |
57 | let tree = libsyntax2::utils::dump_tree(&file); | 57 | let tree = libsyntax2::utils::dump_tree(&file); |
58 | Ok(tree) | 58 | Ok(tree) |
@@ -74,7 +74,7 @@ fn render_test(file: &Path, line: usize) -> Result<(String, String)> { | |||
74 | None => bail!("No test found at line {} at {}", line, file.display()), | 74 | None => bail!("No test found at line {} at {}", line, file.display()), |
75 | Some((_start_line, test)) => test, | 75 | Some((_start_line, test)) => test, |
76 | }; | 76 | }; |
77 | let file = libsyntax2::parse(test.text.clone()); | 77 | let file = libsyntax2::parse(&test.text); |
78 | let tree = libsyntax2::utils::dump_tree(&file); | 78 | let tree = libsyntax2::utils::dump_tree(&file); |
79 | Ok((test.text, tree)) | 79 | Ok((test.text, tree)) |
80 | } | 80 | } |