Remove most uses of forEach. (Note: not talking about SwiftUI ForEach, which is fine and good and should not be removed.)

This commit is contained in:
Brent Simmons committed 2026-01-04 12:36:41 -08:00
1 parent 2d045b6c0f
commit a9b4efeaab
31 files changed
+141 -105

No files matched your search

@@ -493,8 +493,10 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
}
func applyToAvailableCells(_ completion: (MainFeedCollectionViewCell, IndexPath) -> Void) {
collectionView.visibleCells.forEach { cell in
guard let indexPath = collectionView.indexPath(for: cell) else { return }
for cell in collectionView.visibleCells {
guard let indexPath = collectionView.indexPath(for: cell) else {
continue
}
if let cell = collectionView.cellForItem(at: indexPath) as? MainFeedCollectionViewCell {
completion(cell, indexPath)
}