rust-analyzer/crates/ide_db/src
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
..
call_info minor: Simplify 2021-10-03 13:05:42 +02:00
helpers fix: fix insert_use incorrectly merging glob imports 2021-10-03 14:06:44 +02:00
line_index Make utf8 default, implement utf16 in terms of it 2021-02-16 19:17:32 +03:00
traits simplify 2021-05-28 20:46:09 +02:00
apply_change.rs switch log crate to tracing 2021-08-30 15:11:42 +08:00
assists.rs Fix some more basic clippy lints 2021-07-21 20:52:08 +02:00
call_info.rs minor: Simplify 2021-10-03 13:05:42 +02:00
defs.rs Cleanup 2021-09-23 16:28:03 +02:00
helpers.rs Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
items_locator.rs Stop reexporting hir_def's ItemInNs from HIR 2021-07-28 17:39:04 +02:00
label.rs internal: slightly improve compile times 2021-08-29 12:53:56 +03:00
lib.rs Use ManuallyDrop in RootDatabase 2021-08-28 23:05:40 +02:00
line_index.rs internal: use API stabilized in 1.52 2021-05-06 20:12:15 +03:00
path_transform.rs Substitute generic types in inline_call 2021-08-10 14:39:56 +02:00
rename.rs Replace if let Some(_) = foo with if foo.is_some() 2021-10-05 09:00:18 +11:00
search.rs internal: use naming that matches intended use-case 2021-10-02 12:18:18 +03:00
source_change.rs Fix some more basic clippy lints 2021-07-21 20:52:08 +02:00
symbol_index.rs Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
traits.rs Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
ty_filter.rs Fix some more basic clippy lints 2021-07-21 20:52:08 +02:00