Skip to content

Commit 56ae42c

Browse files
duszmoxbendk
authored andcommitted
Fix: Wrap Swift async poll callback in closure
1 parent 76e040f commit 56ae42c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uniffi_bindgen/src/bindings/swift/templates/Async.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ fileprivate func uniffiRustCallAsync<F, T>(
2323
pollResult = await withUnsafeContinuation {
2424
pollFunc(
2525
rustFuture,
26-
uniffiFutureContinuationCallback,
26+
{ handle, pollResult in
27+
uniffiFutureContinuationCallback(handle: handle, pollResult: pollResult)
28+
},
2729
uniffiContinuationHandleMap.insert(obj: $0)
2830
)
2931
}

0 commit comments

Comments
 (0)