mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
cargo clippy --fix
This commit is contained in:
parent
1ab8c7fd27
commit
fad4fa163c
178 changed files with 595 additions and 738 deletions
|
@ -428,7 +428,7 @@ fn signature_help_for_tuple_struct_pat(
|
|||
let fields: Vec<_> = if let PathResolution::Def(ModuleDef::Variant(variant)) = path_res {
|
||||
let en = variant.parent_enum(db);
|
||||
|
||||
res.doc = en.docs(db).map(|it| it.into());
|
||||
res.doc = en.docs(db);
|
||||
format_to!(
|
||||
res.signature,
|
||||
"enum {}::{} (",
|
||||
|
@ -445,7 +445,7 @@ fn signature_help_for_tuple_struct_pat(
|
|||
|
||||
match adt {
|
||||
hir::Adt::Struct(it) => {
|
||||
res.doc = it.docs(db).map(|it| it.into());
|
||||
res.doc = it.docs(db);
|
||||
format_to!(res.signature, "struct {} (", it.name(db).display(db));
|
||||
it.fields(db)
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ fn signature_help_for_record_(
|
|||
fields = variant.fields(db);
|
||||
let en = variant.parent_enum(db);
|
||||
|
||||
res.doc = en.docs(db).map(|it| it.into());
|
||||
res.doc = en.docs(db);
|
||||
format_to!(
|
||||
res.signature,
|
||||
"enum {}::{} {{ ",
|
||||
|
@ -566,12 +566,12 @@ fn signature_help_for_record_(
|
|||
match adt {
|
||||
hir::Adt::Struct(it) => {
|
||||
fields = it.fields(db);
|
||||
res.doc = it.docs(db).map(|it| it.into());
|
||||
res.doc = it.docs(db);
|
||||
format_to!(res.signature, "struct {} {{ ", it.name(db).display(db));
|
||||
}
|
||||
hir::Adt::Union(it) => {
|
||||
fields = it.fields(db);
|
||||
res.doc = it.docs(db).map(|it| it.into());
|
||||
res.doc = it.docs(db);
|
||||
format_to!(res.signature, "union {} {{ ", it.name(db).display(db));
|
||||
}
|
||||
_ => return None,
|
||||
|
@ -638,7 +638,7 @@ fn signature_help_for_tuple_pat_ish(
|
|||
res.push_call_param(&buf);
|
||||
buf.clear();
|
||||
}
|
||||
res.signature.push_str(")");
|
||||
res.signature.push(')');
|
||||
res
|
||||
}
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue