Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f95cfe5

Browse files
committed
fix clippy::redundant_closure: remove redundant closures and call functions directly
1 parent 057730c commit f95cfe5

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_traits/chalk

1 file changed

+2
-2
lines changed

src/librustc_traits/chalk/db.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
276276
parameters[0].assert_ty_ref(&self.interner).could_match(&self.interner, &lowered_ty)
277277
});
278278

279-
let impls = matched_impls.map(|matched_impl| chalk_ir::ImplId(matched_impl)).collect();
279+
let impls = matched_impls.map(chalk_ir::ImplId).collect();
280280
impls
281281
}
282282

@@ -440,7 +440,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
440440
FnOnce => self.tcx.lang_items().fn_once_trait(),
441441
Unsize => self.tcx.lang_items().unsize_trait(),
442442
};
443-
def_id.map(|t| chalk_ir::TraitId(t))
443+
def_id.map(chalk_ir::TraitId)
444444
}
445445

446446
fn is_object_safe(&self, trait_id: chalk_ir::TraitId<RustInterner<'tcx>>) -> bool {

0 commit comments

Comments
 (0)