fix clippy::redundant_closure: remove redundant closures and call functions directly
This commit is contained in:
parent
057730c4b1
commit
f95cfe573a
1 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||||
parameters[0].assert_ty_ref(&self.interner).could_match(&self.interner, &lowered_ty)
|
parameters[0].assert_ty_ref(&self.interner).could_match(&self.interner, &lowered_ty)
|
||||||
});
|
});
|
||||||
|
|
||||||
let impls = matched_impls.map(|matched_impl| chalk_ir::ImplId(matched_impl)).collect();
|
let impls = matched_impls.map(chalk_ir::ImplId).collect();
|
||||||
impls
|
impls
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||||
FnOnce => self.tcx.lang_items().fn_once_trait(),
|
FnOnce => self.tcx.lang_items().fn_once_trait(),
|
||||||
Unsize => self.tcx.lang_items().unsize_trait(),
|
Unsize => self.tcx.lang_items().unsize_trait(),
|
||||||
};
|
};
|
||||||
def_id.map(|t| chalk_ir::TraitId(t))
|
def_id.map(chalk_ir::TraitId)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_object_safe(&self, trait_id: chalk_ir::TraitId<RustInterner<'tcx>>) -> bool {
|
fn is_object_safe(&self, trait_id: chalk_ir::TraitId<RustInterner<'tcx>>) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue