diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-13 08:18:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-13 08:18:49 +0100 |
commit | adbee621a75f47e0da4f30d7205dfce009138865 (patch) | |
tree | ed8dcbba37de566f00d119817e141bb8293ce164 /xtask/src/codegen/gen_lint_completions.rs | |
parent | f107b0f1e223dba33cb9850ce44bcbb4345eef52 (diff) | |
parent | 5ac6804bb3a07b959e8c2c3534255a8d6bb4948c (diff) |
Merge #9242
9242: Clippy r=matklad a=Maan2003
Best viewed commit wise
Co-authored-by: Maan2003 <[email protected]>
Diffstat (limited to 'xtask/src/codegen/gen_lint_completions.rs')
-rw-r--r-- | xtask/src/codegen/gen_lint_completions.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xtask/src/codegen/gen_lint_completions.rs b/xtask/src/codegen/gen_lint_completions.rs index 3b54b2489..54fcaa0e6 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"); |
@@ -140,8 +140,7 @@ fn generate_descriptor_clippy(buf: &mut String, path: &Path) -> Result<()> { | |||
140 | .expect("should be prefixed by what it does") | 140 | .expect("should be prefixed by what it does") |
141 | .strip_suffix(suffix_to_strip) | 141 | .strip_suffix(suffix_to_strip) |
142 | .map(unescape) | 142 | .map(unescape) |
143 | .expect("should be suffixed by comma") | 143 | .expect("should be suffixed by comma"); |
144 | .into(); | ||
145 | } | 144 | } |
146 | } | 145 | } |
147 | clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id)); | 146 | clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id)); |