Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion FunctionalTableData/HostCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public struct HostCell<View, State, Layout>: CellConfigType where View: UIView,
cellUpdater(cell.view, state)
}

@inline(never)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a previous attempt to fix the same crash. It did nothing.

public func isEqual(_ other: CellConfigType) -> Bool {
if let other = other as? HostCell<View, State, Layout> {
return state == other.state
Expand Down
6 changes: 3 additions & 3 deletions FunctionalTableData/TableSectionChangeSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct Moved<T: Equatable>: Equatable {

// Compares two arrays of TableSections and produces the operations
// required to go from one to the other
public struct TableSectionChangeSet {
public final class TableSectionChangeSet {
typealias MovedSection = Moved<Int>
typealias MovedRow = Moved<IndexPath>

Expand Down Expand Up @@ -102,7 +102,7 @@ public struct TableSectionChangeSet {
*
* Whenever a section was also in the previous list, we compare the sections and perform the exact same algorithm on the individual rows.
*/
private mutating func calculateChanges() {
private func calculateChanges() {
let newSections = Set(new.map { $0.key })
var oldSections: [String: Int] = Dictionary(minimumCapacity: old.count)
for (oldSectionIndex, oldSection) in old.enumerated() {
Expand Down Expand Up @@ -167,7 +167,7 @@ public struct TableSectionChangeSet {
return new.section.mergedStyle(for: new.row) == old.section.mergedStyle(for: old.row)
}

private mutating func compareRows(newRows: inout Set<String>, oldRows: inout [String: Int], oldSectionIndex: Int, newSectionIndex: Int) {
private func compareRows(newRows: inout Set<String>, oldRows: inout [String: Int], oldSectionIndex: Int, newSectionIndex: Int) {
// Clear the set and dictionary, ensuring we keep the capacity to reduce allocations
newRows.removeAll(keepingCapacity: true)
oldRows.removeAll(keepingCapacity: true)
Expand Down