This commit is contained in:
Erik 2016-09-14 07:16:22 -04:00
parent 72b6565510
commit 723129b639
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D

View File

@ -137,8 +137,11 @@ struct SocketPacket {
if dict["_placeholder"] as? Bool ?? false {
return binary[dict["num"] as! Int]
} else {
return dict.reduce(NSMutableDictionary(), {cur, keyValue in
return dict.reduce([String: Any](), {cur, keyValue in
var cur = cur
cur[keyValue.0] = _fillInPlaceholders(keyValue.1)
return cur
})
}
@ -183,6 +186,7 @@ private extension SocketPacket {
switch data {
case let bin as Data:
binary.append(bin)
return placeholder
case let arr as [Any]:
return arr.map({shred($0, binary: &binary)})