Skip to content

Commit 64dca31

Browse files
committed
Simplify a tad
1 parent 04c8058 commit 64dca31

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,16 @@ extension ExitTest {
268268
typealias TestContentAccessorHint = ID
269269

270270
/// The ID of the represented exit test.
271-
private var _id: ExitTest.ID
271+
var id: ExitTest.ID
272272

273273
/// The body of the represented exit test.
274-
private var _body: @Sendable () async throws -> Void
275-
276-
init(id: ExitTest.ID, body: @escaping @Sendable () async throws -> Void) {
277-
_id = id
278-
_body = body
279-
}
274+
var body: @Sendable () async throws -> Void
280275

281276
/// Make the exit test represented by this instance.
282277
///
283278
/// - Returns: A new exit test as represented by this instance.
284279
func makeExitTest() -> ExitTest {
285-
ExitTest(id: _id, body: _body)
280+
ExitTest(id: id, body: body)
286281
}
287282
}
288283

@@ -316,7 +311,7 @@ extension ExitTest {
316311
if let hintedID = hintAddress?.load(as: ID.self), hintedID != id {
317312
return false
318313
}
319-
outValue.initializeMemory(as: Record.self, to: Record(id: id, body: body))
314+
outValue.initializeMemory(as: Record.self, to: .init(id: id, body: body))
320315
return true
321316
}
322317
}

0 commit comments

Comments
 (0)