Skip to content
Snippets Groups Projects
Commit a07745cb authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update StoreReceptionIdentity functor

parent 2f3233dc
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
...@@ -2,11 +2,11 @@ import Bindings ...@@ -2,11 +2,11 @@ import Bindings
import XCTestDynamicOverlay import XCTestDynamicOverlay
public struct StoreReceptionIdentity { public struct StoreReceptionIdentity {
public var run: (String, Data, Int) throws -> Bool public var run: (String, ReceptionIdentity, Int) throws -> Bool
public func callAsFunction( public func callAsFunction(
key: String, key: String,
identity: Data, identity: ReceptionIdentity,
cmixId: Int cmixId: Int
) throws -> Bool { ) throws -> Bool {
try run(key, identity, cmixId) try run(key, identity, cmixId)
...@@ -16,7 +16,8 @@ public struct StoreReceptionIdentity { ...@@ -16,7 +16,8 @@ public struct StoreReceptionIdentity {
extension StoreReceptionIdentity { extension StoreReceptionIdentity {
public static let live = StoreReceptionIdentity { key, identity, cmixId in public static let live = StoreReceptionIdentity { key, identity, cmixId in
var error: NSError? var error: NSError?
let result = BindingsStoreReceptionIdentity(key, identity, cmixId, &error) let identityData = try identity.encode()
let result = BindingsStoreReceptionIdentity(key, identityData, cmixId, &error)
if let error = error { if let error = error {
throw error throw error
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment