Make ::set_{byte,point}_range methods take a Range

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-05-28 14:15:05 -07:00
parent 7f4eb9a222
commit d72771a19f
4 changed files with 53 additions and 36 deletions

View file

@ -309,7 +309,7 @@ fn run() -> error::Result<()> {
let query_path = Path::new(matches.value_of("query-path").unwrap());
let range = matches.value_of("byte-range").map(|br| {
let r: Vec<&str> = br.split(":").collect();
(r[0].parse().unwrap(), r[1].parse().unwrap())
r[0].parse().unwrap()..r[1].parse().unwrap()
});
let should_test = matches.is_present("test");
query::query_files_at_paths(