-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor/refactoring 🖖 #12
base: master
Are you sure you want to change the base?
Conversation
@@ -9,15 +9,25 @@ | |||
import UIKit | |||
|
|||
public class CollectionViewDataSource<CellDeclaration>: NSObject, UICollectionViewDataSource { | |||
|
|||
// MARK: Public Properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think these kinds of comments are redundant.
|
||
// MARK: Init | ||
|
||
public init(binderFromDeclaration: @escaping Configurator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(CellDeclaration) -> CellBinder
is short enough and clearer than Configurator
.
@@ -12,7 +12,7 @@ import DataSourceKit | |||
class CTableViewCell: UITableViewCell { | |||
var idLabel = UILabel(frame: .zero) | |||
|
|||
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | |||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is applied in #13, so please update this branch. Sorry for my late response 🙇
@@ -26,7 +26,7 @@ public struct CellBinder { | |||
self.reuseIdentifier = reuseIdentifier | |||
self.configureCell = { cell in | |||
guard let cell = cell as? Cell else { | |||
fatalError("Could not cast UICollectionView cell to \(Cell.self)") | |||
fatalError("Could not cast cell to \(Cell.self)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍
In this PR, I refactor some part of the code.