mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
modernize even more
This commit is contained in:
parent
f6e8b376d1
commit
28ddecf6c9
12 changed files with 29 additions and 70 deletions
|
@ -1,11 +1,3 @@
|
|||
extern crate clap;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
extern crate join_to_string;
|
||||
extern crate ra_editor;
|
||||
extern crate ra_syntax;
|
||||
extern crate tools;
|
||||
|
||||
use std::{fs, io::Read, path::Path, time::Instant};
|
||||
|
||||
use clap::{App, Arg, SubCommand};
|
||||
|
@ -97,7 +89,7 @@ fn render_test(file: &Path, line: usize) -> Result<(String, String)> {
|
|||
*start_line <= line && line <= *start_line + t.text.lines().count()
|
||||
});
|
||||
let test = match test {
|
||||
None => bail!("No test found at line {} at {}", line, file.display()),
|
||||
None => failure::bail!("No test found at line {} at {}", line, file.display()),
|
||||
Some((_start_line, test)) => test,
|
||||
};
|
||||
let file = SourceFileNode::parse(&test.text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue