Replace uses of forEach with for-in loops.

This commit is contained in:
Brent Simmons
2023-07-09 22:14:09 -07:00
parent 090e63b017
commit abb11afe3d
6 changed files with 43 additions and 35 deletions

View File

@@ -879,9 +879,9 @@ private extension MasterFeedViewController {
}
func applyToAvailableCells(_ completion: (MasterFeedTableViewCell, IndexPath) -> Void) {
tableView.visibleCells.forEach { cell in
for cell in tableView.visibleCells {
guard let indexPath = tableView.indexPath(for: cell) else {
return
continue
}
completion(cell as! MasterFeedTableViewCell, indexPath)
}