aboutsummaryrefslogtreecommitdiff
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/main.rs4
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<()> {
52fn parse() -> Result<String> { 52fn 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}