From ecab33bdce122dd7dc7a69d7a97c6f8393e9e3ce Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 13 May 2022 17:33:07 -0400 Subject: [PATCH] Better generics for LazilyDecoding --- Tusker/LazilyDecoding.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/LazilyDecoding.swift b/Tusker/LazilyDecoding.swift index e96b4d7e..86cc4bf6 100644 --- a/Tusker/LazilyDecoding.swift +++ b/Tusker/LazilyDecoding.swift @@ -58,8 +58,8 @@ public struct LazilyDecoding { } extension LazilyDecoding { - init(arrayFrom keyPath: ReferenceWritableKeyPath) { - self.init(from: keyPath, fallback: [] as! Value) + init(arrayFrom keyPath: ReferenceWritableKeyPath) where Value == [T] { + self.init(from: keyPath, fallback: []) } }