mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Auto merge of #13860 - danieleades:clippy, r=lnicola
fix a bunch of clippy lints fixes a bunch of clippy lints for fun and profit i'm aware of this repo's position on clippy. The changes are split into separate commits so they can be reviewed separately
This commit is contained in:
commit
f77b68a3cb
120 changed files with 298 additions and 375 deletions
|
@ -253,7 +253,7 @@ fn label_of_ty(
|
|||
ty: hir::Type,
|
||||
label_builder: &mut InlayHintLabelBuilder<'_>,
|
||||
) {
|
||||
let iter_item_type = hint_iterator(sema, &famous_defs, &ty);
|
||||
let iter_item_type = hint_iterator(sema, famous_defs, &ty);
|
||||
match iter_item_type {
|
||||
Some(ty) => {
|
||||
const LABEL_START: &str = "impl Iterator<Item = ";
|
||||
|
@ -279,7 +279,7 @@ fn label_of_ty(
|
|||
location_link_enabled: config.location_links,
|
||||
result: InlayHintLabel::default(),
|
||||
};
|
||||
rec(sema, &famous_defs, config.max_length, ty, &mut label_builder);
|
||||
rec(sema, famous_defs, config.max_length, ty, &mut label_builder);
|
||||
let r = label_builder.finish();
|
||||
Some(r)
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ pub(crate) fn inlay_hints(
|
|||
|
||||
let mut acc = Vec::new();
|
||||
|
||||
if let Some(scope) = sema.scope(&file) {
|
||||
if let Some(scope) = sema.scope(file) {
|
||||
let famous_defs = FamousDefs(&sema, scope.krate());
|
||||
|
||||
let hints = |node| hints(&mut acc, &famous_defs, config, file_id, node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue