Skip to content

Commit a31d620

Browse files
committed
Improves IdentifiableValue conversion to String.
1 parent e3049e8 commit a31d620

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Sources/DataSources/AnimationConfiguration.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Foundation
10+
import UIKit
1011

1112
/**
1213
Exposes custom animation styles for insertion, deletion and reloading behavior.

Sources/DataSources/IdentifiableValue.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,26 @@
88

99
import Foundation
1010

11-
public struct IdentitifiableValue<Value: Hashable> : IdentifiableType, Equatable {
11+
public struct IdentitifiableValue<Value: Hashable>
12+
: IdentifiableType
13+
, Equatable
14+
, CustomStringConvertible
15+
, CustomDebugStringConvertible {
1216
public typealias Identity = Value
1317

1418
public let value: Value
1519

1620
public var identity : Identity {
1721
return value
1822
}
23+
24+
public var description: String {
25+
return "\(value)"
26+
}
27+
28+
public var debugDescription: String {
29+
return "\(value)"
30+
}
1931
}
2032

2133
public func == <V: Hashable>(lhs: IdentitifiableValue<V>, rhs: IdentitifiableValue<V>) -> Bool {

0 commit comments

Comments
 (0)