Skip to content

Commit

Permalink
Merge pull request #105 from valeriyvan/contains
Browse files Browse the repository at this point in the history
Minor change improving code readability
  • Loading branch information
mattbischoff committed Aug 16, 2019
2 parents 0d62066 + 75d5c2b commit 8f6a9a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CombinedDocument.md
Expand Up @@ -569,7 +569,7 @@ final class TableViewDataSource<CollectionType: Collection>: NSObject, UITableVi
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard indexPath.row < collection.count, indexPath.row >= 0 else {
guard collection.indices.contains(indexPath.row) else {
logAssertionFailure(message: "The index path \(indexPath) provided is out of range. This is unexpected.`")
return UITableViewCell()
}
Expand Down
2 changes: 1 addition & 1 deletion CommonControllerTypes.md
Expand Up @@ -284,7 +284,7 @@ final class TableViewDataSource<CollectionType: Collection>: NSObject, UITableVi
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard indexPath.row < collection.count, indexPath.row >= 0 else {
guard collection.indices.contains(indexPath.row) else {
logAssertionFailure(message: "The index path \(indexPath) provided is out of range. This is unexpected.`")
return UITableViewCell()
}
Expand Down

0 comments on commit 8f6a9a4

Please sign in to comment.