Created
December 12, 2024 06:25
-
-
Save Kyome22/5b1427bccd18556137472fb67eeb04d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AppKit | |
struct Hoge { | |
@discardableResult | |
static func doSomething(handler block: @escaping () -> Void) -> Any? { nil } | |
} | |
actor SomeService { | |
func update() {} | |
func subscribe1() { | |
Hoge.doSomething(handler: { [weak self] in | |
self?.update() | |
}) | |
} | |
func subscribe2() { | |
Hoge.doSomething { | |
self.update() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment