Skip to content

Commit

Permalink
Cleanup (#119).
Browse files Browse the repository at this point in the history
GitHub action failed because I used a tuple label introduced in Swift 5.8.
  • Loading branch information
oscbyspro committed Dec 10, 2023
1 parent da5b5f6 commit b4884ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/NBKFlexibleWidthKitTests/NBKFlexibleWidth+Words.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,19 @@ _ words: [UInt], _ count: Int, _ integer: T,
file: StaticString = #file, line: UInt = #line) {
//=------------------------------------------=
if count == words.count {
let initialized = T.uninitialized(count: count, init:{ let _ = $0.initialize(from: words) })
let initialized = T.uninitialized(count: count, init:{ _ = $0.initialize(from: words) })
XCTAssertEqual(initialized, integer, file: file, line: line)
}

brr: do {
let capacity: Int = count
let initialized = T.uninitialized(capacity: capacity, init:{ $1 = $0.initialize(from: words.prefix(count)).index })
let initialized = T.uninitialized(capacity: capacity, init:{ $1 = $0.initialize(from: words.prefix(count)).1 })
XCTAssertEqual(initialized, integer, file: file, line: line)
}

brr: do {
let capacity: Int = count + 1
let initialized = T.uninitialized(capacity: capacity, init:{ $1 = $0.initialize(from: words.prefix(count)).index })
let initialized = T.uninitialized(capacity: capacity, init:{ $1 = $0.initialize(from: words.prefix(count)).1 })
XCTAssertEqual(initialized, integer, file: file, line: line)
}
}
Expand Down

0 comments on commit b4884ed

Please sign in to comment.