-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
I'm trying to follow the instructions in the book to get started with swift-bridge. I'm not sure if this is a new thing in Swift, but I'm getting the following error:
[...]/ios-rust-analyzer/IosRustAnalyzer/SwiftBridgeCore.swift:874:5: Nonisolated deinitializer 'deinit' has different actor isolation from main actor-isolated overridden declaration
I've gotten past this error just by adding the "isolate" keyword to the deinit. I don't know if that's the right solution, since I'm new to all of this, but the result looks like:
public class RustString: RustStringRefMut {
var isOwned: Bool = true
public override init(ptr: UnsafeMutableRawPointer) {
super.init(ptr: ptr)
}
isolated deinit {
if isOwned {
__swift_bridge__$RustString$_free(ptr)
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels