aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-04 23:14:46 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-04 23:14:46 +0100
commit5deb907b4321d8328978d3322b0826b781814452 (patch)
tree2baa3b75b1ef62c02617c37ba9b800c41a3dd102 /crates/ra_cli/src
parent8bd0e844247dc28d6ceb24b00f3cc3396bd5bf03 (diff)
parentaa30c4909ebb1e85f1591f465c9e2875aa4d394e (diff)
Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go. cc #848 Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_cli/src')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index b481ace9e..8bb524ce3 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -31,18 +31,16 @@ pub fn run(verbose: bool, path: &str, only: Option<&str>) -> Result<()> {
31 31
32 for decl in module.declarations(&db) { 32 for decl in module.declarations(&db) {
33 num_decls += 1; 33 num_decls += 1;
34 match decl { 34 if let ModuleDef::Function(f) = decl {
35 ModuleDef::Function(f) => funcs.push(f), 35 funcs.push(f);
36 _ => {}
37 } 36 }
38 } 37 }
39 38
40 for impl_block in module.impl_blocks(&db) { 39 for impl_block in module.impl_blocks(&db) {
41 for item in impl_block.items(&db) { 40 for item in impl_block.items(&db) {
42 num_decls += 1; 41 num_decls += 1;
43 match item { 42 if let ImplItem::Method(f) = item {
44 ImplItem::Method(f) => funcs.push(f), 43 funcs.push(f);
45 _ => {}
46 } 44 }
47 } 45 }
48 } 46 }