mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Replace x
with it
This commit is contained in:
parent
4125fea0a7
commit
3a1054fc1c
42 changed files with 590 additions and 582 deletions
|
@ -251,8 +251,8 @@ impl HirDisplay for GenericParam {
|
|||
impl HirDisplay for TypeOrConstParam {
|
||||
fn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), HirDisplayError> {
|
||||
match self.split(f.db) {
|
||||
either::Either::Left(x) => x.hir_fmt(f),
|
||||
either::Either::Right(x) => x.hir_fmt(f),
|
||||
either::Either::Left(it) => it.hir_fmt(f),
|
||||
either::Either::Right(it) => it.hir_fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -303,11 +303,11 @@ fn write_generic_params(
|
|||
) -> Result<(), HirDisplayError> {
|
||||
let params = f.db.generic_params(def);
|
||||
if params.lifetimes.is_empty()
|
||||
&& params.type_or_consts.iter().all(|x| x.1.const_param().is_none())
|
||||
&& params.type_or_consts.iter().all(|it| it.1.const_param().is_none())
|
||||
&& params
|
||||
.type_or_consts
|
||||
.iter()
|
||||
.filter_map(|x| x.1.type_param())
|
||||
.filter_map(|it| it.1.type_param())
|
||||
.all(|param| !matches!(param.provenance, TypeParamProvenance::TypeParamList))
|
||||
{
|
||||
return Ok(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue