From 06aca7691c845d129abc49fb649ea7c42376a077 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Wed, 24 Mar 2021 14:52:13 +0900 Subject: clippy lint --- helix-syntax/build.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'helix-syntax') diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs index f08a8819..ecf33dfe 100644 --- a/helix-syntax/build.rs +++ b/helix-syntax/build.rs @@ -11,7 +11,7 @@ fn get_debug() -> bool { env::var("DEBUG").unwrap() == "true" } -fn collect_tree_sitter_dirs(ignore: Vec) -> Vec { +fn collect_tree_sitter_dirs(ignore: &[String]) -> Vec { let mut dirs = Vec::new(); for entry in fs::read_dir("languages").unwrap().flatten() { let path = entry.path(); @@ -97,12 +97,12 @@ fn build_dir(dir: &str, language: &str) { eprintln!("You can fix in using 'git submodule init && git submodule update --recursive'."); std::process::exit(1); } - let (c, cpp) = collect_src_files(&dir); + let (c, cpp) = collect_src_files(dir); if !c.is_empty() { - build_c(c, &language); + build_c(c, language); } if !cpp.is_empty() { - build_cpp(cpp, &language); + build_cpp(cpp, language); } } @@ -111,7 +111,7 @@ fn main() { "tree-sitter-typescript".to_string(), "tree-sitter-cpp".to_string(), ]; - let dirs = collect_tree_sitter_dirs(ignore); + let dirs = collect_tree_sitter_dirs(&ignore); let mut n_jobs = 0; let pool = threadpool::Builder::new().build(); // by going through the builder, it'll use num_cpus @@ -123,7 +123,7 @@ fn main() { pool.execute(move || { let language = &dir[12..]; // skip tree-sitter- prefix - build_dir(&dir, &language); + build_dir(&dir, language); // report progress tx.send(1).unwrap(); -- cgit v1.2.3-70-g09d2