Skip to content

Commit 0c20a72

Browse files
authored
Make ExitTest._current immutable. (#1218)
This PR makes the private `ExitTest._current` stored property a `let` instead of a `var`. This has no practical effect but is more correct. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent f9fb1ec commit 0c20a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ extension ExitTest {
153153
///
154154
/// A pointer is used for indirection because `ManagedBuffer` cannot yet hold
155155
/// move-only types.
156-
private static nonisolated(unsafe) var _current: Locked<UnsafeMutablePointer<ExitTest?>> = {
156+
private static nonisolated(unsafe) let _current: Locked<UnsafeMutablePointer<ExitTest?>> = {
157157
let current = UnsafeMutablePointer<ExitTest?>.allocate(capacity: 1)
158158
current.initialize(to: nil)
159159
return Locked(rawValue: current)

0 commit comments

Comments
 (0)