From d9dbcb59de6d652d035e00388d0b80e615fa7504 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 8 Jul 2020 16:34:14 -0300 Subject: [PATCH] Respond to CR. --- .../src/Util/RemoteConfigManager.swift | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/SignalServiceKit/src/Util/RemoteConfigManager.swift b/SignalServiceKit/src/Util/RemoteConfigManager.swift index 35c0a88f93..4ca00ed6b4 100644 --- a/SignalServiceKit/src/Util/RemoteConfigManager.swift +++ b/SignalServiceKit/src/Util/RemoteConfigManager.swift @@ -348,33 +348,12 @@ public class ServiceRemoteConfigManager: NSObject, RemoteConfigManager { } } - private static func isValidValue(_ value: Any) -> Bool { + private static func isValidValue(_ value: AnyObject) -> Bool { // Discard Data for now; ParamParser can't auto-decode them. if value as? String != nil { return true - } else if value as? Bool != nil { - return true - } else if value as? Int != nil { - return true - } else if value as? UInt != nil { - return true - } else if value as? Int8 != nil { - return true - } else if value as? UInt8 != nil { - return true - } else if value as? Int16 != nil { - return true - } else if value as? UInt16 != nil { - return true - } else if value as? Int32 != nil { - return true - } else if value as? UInt32 != nil { - return true - } else if value as? Int64 != nil { - return true - } else if value as? UInt64 != nil { - return true } else { + owsFailDebug("Unexpected value: \(type(of: value))") return false } }