Skip to content
Open
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
24 changes: 24 additions & 0 deletions sources/data_structures/collection_record.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,27 @@ public func ==(lhs: CollectionRecord, rhs: CollectionRecord) -> Bool {
}

}

extension CollectionRecord: CustomDebugStringConvertible {
public var debugDescription: String {
switch self {
case .AddItem(section: let section, index: let index):
return "AddItem: \(section),\(index)"
case .RemoveItem(section: let section, index: let index):
return "RemoveItem: \(section),\(index)"
case .MoveItem(from: let from, to: let to):
return "MoveItem: from \(from.section),\(from.index) to \(to.section),\(to.index)"
case .ChangeItem(from: let from, to: let to):
return "ChangeItem: from \(from.section),\(from.index) to \(to.section),\(to.index)"
case .AddSection(section: let section):
return "AddSection: \(section)"
case .MoveSection(section: let from, from: let to):
return "MoveSection: from \(from) to \(to)"
case .RemoveSection(section: let section):
return "RemoveSection: \(section)"
case .ReloadSection(section: let section):
return "ReloadSection: \(section)"
}
}
}