Fix a weak var warning in Swift 6.3

This commit is contained in:
Sami Samhuri 2026-05-17 11:19:15 -07:00
parent 9bcd95486b
commit 0eea671e65
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# Releasing AsyncMonitor
There's no schedule here. Ship bug fixes whenever, features when they're ready, and breaking changes as rarely as you can stand.
There's no schedule here. Ship bug fixes whenever, features when they're ready, and breaking changes rarely.
AsyncMonitor is a Swift package and a release is just a git tag. SwiftPM resolves versions directly from tags.

View file

@ -6,7 +6,7 @@ import Testing
@Test func storeInsertsIntoSetAndKeepsSubjectAlive() throws {
var subject: TestCancellable? = TestCancellable()
weak var weakSubject: TestCancellable? = subject
weak let weakSubject: TestCancellable? = subject
try #require(subject).store(in: &cancellables)
#expect(cancellables.count == 1)
subject = nil