Simplify code by using VecMap::get_by
This commit is contained in:
parent
dd56ec653c
commit
1278f3f295
2 changed files with 65 additions and 73 deletions
|
@ -1291,9 +1291,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
};
|
||||
|
||||
let concrete_ty = match concrete_opaque_types
|
||||
.iter()
|
||||
.find(|(key, _)| key.def_id == opaque_type_key.def_id)
|
||||
.map(|(_, ty)| ty)
|
||||
.get_by(|(key, _)| key.def_id == opaque_type_key.def_id)
|
||||
{
|
||||
None => {
|
||||
if !concrete_is_opaque {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue