diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-06 18:17:09 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-06 18:17:09 +0000 |
commit | 8e60e751cbcfa47c7bed788dfe2ab5cebfcb78b3 (patch) | |
tree | 58f01a945f7c27d6baaecf38e84617ca46782073 /crates/ra_cli/src | |
parent | 5ad84f0ca5fe9bb250cd4026e5dcb5478d932666 (diff) | |
parent | 28ddecf6c99ef23bc96b9eb7bc8ee049f1732e76 (diff) |
Merge #260
260: Modernize r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_cli/src')
-rw-r--r-- | crates/ra_cli/src/main.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 5ca86df4d..939f7fe77 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -1,11 +1,3 @@ | |||
1 | extern crate clap; | ||
2 | #[macro_use] | ||
3 | extern crate failure; | ||
4 | extern crate join_to_string; | ||
5 | extern crate ra_editor; | ||
6 | extern crate ra_syntax; | ||
7 | extern crate tools; | ||
8 | |||
9 | use std::{fs, io::Read, path::Path, time::Instant}; | 1 | use std::{fs, io::Read, path::Path, time::Instant}; |
10 | 2 | ||
11 | use clap::{App, Arg, SubCommand}; | 3 | use clap::{App, Arg, SubCommand}; |
@@ -97,7 +89,7 @@ fn render_test(file: &Path, line: usize) -> Result<(String, String)> { | |||
97 | *start_line <= line && line <= *start_line + t.text.lines().count() | 89 | *start_line <= line && line <= *start_line + t.text.lines().count() |
98 | }); | 90 | }); |
99 | let test = match test { | 91 | let test = match test { |
100 | None => bail!("No test found at line {} at {}", line, file.display()), | 92 | None => failure::bail!("No test found at line {} at {}", line, file.display()), |
101 | Some((_start_line, test)) => test, | 93 | Some((_start_line, test)) => test, |
102 | }; | 94 | }; |
103 | let file = SourceFileNode::parse(&test.text); | 95 | let file = SourceFileNode::parse(&test.text); |