aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
committerMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
commitc9b4ac5be4daaabc062ab1ee663eba8594750003 (patch)
tree6090c8c38c735875c916255920525cf5fff45c75 /xtask/src
parentd6737e55fb49d286b5e646f57975b27b2c95ce92 (diff)
clippy::redudant_borrow
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/gen_lint_completions.rs2
-rw-r--r--xtask/src/codegen/gen_syntax.rs6
-rw-r--r--xtask/src/metrics.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/xtask/src/codegen/gen_lint_completions.rs b/xtask/src/codegen/gen_lint_completions.rs
index 3b54b2489..4aebb02bd 100644
--- a/xtask/src/codegen/gen_lint_completions.rs
+++ b/xtask/src/codegen/gen_lint_completions.rs
@@ -28,7 +28,7 @@ pub(crate) fn generate_lint_completions() -> Result<()> {
28 contents.push('\n'); 28 contents.push('\n');
29 29
30 cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?; 30 cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?;
31 generate_descriptor_clippy(&mut contents, &Path::new("./target/clippy_lints.json"))?; 31 generate_descriptor_clippy(&mut contents, Path::new("./target/clippy_lints.json"))?;
32 let contents = reformat(&contents)?; 32 let contents = reformat(&contents)?;
33 33
34 let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs"); 34 let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs");
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index b0b9e30db..5435da76e 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -258,7 +258,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
258 for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") { 258 for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") {
259 res.push_str(chunk); 259 res.push_str(chunk);
260 if let Some(doc) = docs.next() { 260 if let Some(doc) = docs.next() {
261 write_doc_comment(&doc, &mut res); 261 write_doc_comment(doc, &mut res);
262 } 262 }
263 } 263 }
264 264
@@ -294,14 +294,14 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result<String> {
294 294
295 let full_keywords_values = &grammar.keywords; 295 let full_keywords_values = &grammar.keywords;
296 let full_keywords = 296 let full_keywords =
297 full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(&kw))); 297 full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(kw)));
298 298
299 let all_keywords_values = 299 let all_keywords_values =
300 grammar.keywords.iter().chain(grammar.contextual_keywords.iter()).collect::<Vec<_>>(); 300 grammar.keywords.iter().chain(grammar.contextual_keywords.iter()).collect::<Vec<_>>();
301 let all_keywords_idents = all_keywords_values.iter().map(|kw| format_ident!("{}", kw)); 301 let all_keywords_idents = all_keywords_values.iter().map(|kw| format_ident!("{}", kw));
302 let all_keywords = all_keywords_values 302 let all_keywords = all_keywords_values
303 .iter() 303 .iter()
304 .map(|name| format_ident!("{}_KW", to_upper_snake_case(&name))) 304 .map(|name| format_ident!("{}_KW", to_upper_snake_case(name)))
305 .collect::<Vec<_>>(); 305 .collect::<Vec<_>>();
306 306
307 let literals = 307 let literals =
diff --git a/xtask/src/metrics.rs b/xtask/src/metrics.rs
index 34679062f..7b190d425 100644
--- a/xtask/src/metrics.rs
+++ b/xtask/src/metrics.rs
@@ -71,7 +71,7 @@ impl Metrics {
71 Ok(()) 71 Ok(())
72 } 72 }
73 fn measure_analysis_stats_self(&mut self) -> Result<()> { 73 fn measure_analysis_stats_self(&mut self) -> Result<()> {
74 self.measure_analysis_stats_path("self", &".") 74 self.measure_analysis_stats_path("self", ".")
75 } 75 }
76 fn measure_analysis_stats(&mut self, bench: &str) -> Result<()> { 76 fn measure_analysis_stats(&mut self, bench: &str) -> Result<()> {
77 self.measure_analysis_stats_path( 77 self.measure_analysis_stats_path(