Skip to content

Commit 49101a5

Browse files
committed
Remove redundant calls to slice::iter in for loops
1 parent 17d0d93 commit 49101a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_middle/src/ty/trait_def.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ pub(super) fn trait_impls_of_provider(tcx: TyCtxt<'_>, trait_id: DefId) -> Trait
203203
// Traits defined in the current crate can't have impls in upstream
204204
// crates, so we don't bother querying the cstore.
205205
if !trait_id.is_local() {
206-
for &cnum in tcx.crates(()).iter() {
207-
for &(impl_def_id, simplified_self_ty) in
208-
tcx.implementations_of_trait((cnum, trait_id)).iter()
206+
for &cnum in tcx.crates(()) {
207+
for &(impl_def_id, simplified_self_ty) in tcx.implementations_of_trait((cnum, trait_id))
209208
{
210209
if let Some(simplified_self_ty) = simplified_self_ty {
211210
impls

0 commit comments

Comments
 (0)