summaryrefslogtreecommitdiff
path: root/helix-syntax
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-24 05:52:13 +0000
committerBlaž Hrastnik2021-03-24 05:58:01 +0000
commit06aca7691c845d129abc49fb649ea7c42376a077 (patch)
treed8eaf53aec0d323914d7839a36caa2a748885c3a /helix-syntax
parent8a0ab447ecfa6c2c448603d469ba4fd06e95c754 (diff)
clippy lint
Diffstat (limited to 'helix-syntax')
-rw-r--r--helix-syntax/build.rs12
1 files changed, 6 insertions, 6 deletions
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<String>) -> Vec<String> {
+fn collect_tree_sitter_dirs(ignore: &[String]) -> Vec<String> {
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();