forked from shadowfacts/Tusker
Better generics for LazilyDecoding
This commit is contained in:
parent
cc0da2ec54
commit
ecab33bdce
|
@ -58,8 +58,8 @@ public struct LazilyDecoding<Enclosing, Value: Codable> {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension LazilyDecoding {
|
extension LazilyDecoding {
|
||||||
init(arrayFrom keyPath: ReferenceWritableKeyPath<Enclosing, Data?>) {
|
init<T: Codable>(arrayFrom keyPath: ReferenceWritableKeyPath<Enclosing, Data?>) where Value == [T] {
|
||||||
self.init(from: keyPath, fallback: [] as! Value)
|
self.init(from: keyPath, fallback: [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue