RxSwift
RxSwift copied to clipboard
Fix Swift 6.2 weak mutability warning in Binder
Introduction of weak let additionally added new checks, so the existing pattern warns that weakTarget will never have new value assigned by programmer.
Switching to capture list to get rid of the warning.
Redacted diagnostics message:
..RxSwift/Binder.swift:29:18: weak variable 'weakTarget' was never mutated; consider changing to 'let' constant [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/weak-mutability\WeakMutability]8;;\]
Link is broken, and not able to find related article (yet?).