rust/crates
bors[bot] 86c534f244
Merge #10440
10440: Fix Clippy warnings and replace some `if let`s with `match` r=Veykril a=arzg

I decided to try fixing a bunch of Clippy warnings. I am aware of this project’s opinion of Clippy (I have read both [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537) and [rust-analyzer/rowan#57 (comment)](https://github.com/rust-analyzer/rowan/pull/57#discussion_r415676159)), so I totally understand if part of or the entirety of this PR is rejected. In particular, I can see how the semicolons and `if let` vs `match` commits provide comparatively little benefit when compared to the ensuing churn.

I tried to separate each kind of change into its own commit to make it easier to discard certain changes. I also only applied Clippy suggestions where I thought they provided a definite improvement to the code (apart from semicolons, which is IMO more of a formatting/consistency question than a linting question). In the end I accumulated a list of 28 Clippy lints I ignored entirely.

Sidenote: I should really have asked about this on Zulip before going through all 1,555 `if let`s in the codebase to decide which ones definitely look better as `match` :P

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-10-05 08:58:40 +00:00
..
base_db support non-extern-prelude dependencies 2021-09-28 21:23:46 +02:00
cfg Simplify int_in_range 2021-08-31 13:11:17 +02:00
flycheck Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
hir Merge #10440 2021-10-05 08:58:40 +00:00
hir_def Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
hir_expand Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
hir_ty Merge #10440 2021-10-05 08:58:40 +00:00
ide Merge #10440 2021-10-05 08:58:40 +00:00
ide_assists Merge #10440 2021-10-05 08:58:40 +00:00
ide_completion Merge #10440 2021-10-05 08:58:40 +00:00
ide_db Merge #10440 2021-10-05 08:58:40 +00:00
ide_diagnostics Simplify 2021-10-04 15:16:13 +02:00
ide_ssr Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
limit internal: add API to check what are the max limits in practice 2021-07-31 18:26:43 +03:00
mbe minor: simplify 2021-10-02 20:38:39 +03:00
parser Merge #10440 2021-10-05 08:58:40 +00:00
paths Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
proc_macro_api Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
proc_macro_srv Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
proc_macro_test cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
profile Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
project_model Only add proc_macro to prelude in proc-macro crates 2021-10-04 18:22:39 +02:00
rust-analyzer Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
sourcegen Add semicolons for consistency 2021-10-03 23:39:43 +11:00
stdx Add semicolons for consistency 2021-10-03 23:39:43 +11:00
syntax Merge #10440 2021-10-05 08:58:40 +00:00
test_utils Merge #10440 2021-10-05 08:58:40 +00:00
text_edit Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
toolchain minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
tt Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
vfs Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
vfs-notify Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00