Skip to content

Commit 4f329ab

Browse files
committed
Cleanup.
1 parent 0061d26 commit 4f329ab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Tests/DiffableTextStylesXNumericTests/Number/NumberTests+Number.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ final class NumberTestsXGlyph: Tests {
3232
/// 10,000 digits and 10,000 iterations: 10.137 seconds.
3333
func test_Digits_ForEachUnicodeScalar_String() {
3434
measure {
35-
var accumulator = String()
36-
accumulator.reserveCapacity(digits.count * iterations)
35+
var string = String()
36+
string.reserveCapacity(digits.count * iterations)
3737
//=--------------------------------------=
38-
// MARK: Append
38+
// MARK: Insert
3939
//=--------------------------------------=
4040
for _ in 0 ..< iterations {
4141
for digit in digits {
42-
digit.unicode.write(to: &accumulator)
42+
digit.unicode.write(to: &string)
4343
}
4444
}
4545
}
@@ -48,18 +48,18 @@ final class NumberTestsXGlyph: Tests {
4848
/// 10,000 digits and 10,000 iterations: 0.030 seconds.
4949
func test_Digits_UnsafeBitCastToBytes_String() {
5050
measure {
51-
var accumulator = [UInt8]()
52-
accumulator.reserveCapacity(digits.count * iterations)
51+
var bytes = [UInt8]()
52+
bytes.reserveCapacity(digits.count * iterations)
5353
//=--------------------------------------=
54-
// MARK: Append
54+
// MARK: Insert
5555
//=--------------------------------------=
5656
for _ in 0 ..< iterations {
57-
accumulator.append(contentsOf: unsafeBitCast(digits, to: [UInt8].self))
57+
bytes.append(contentsOf: unsafeBitCast(digits, to: [UInt8].self))
5858
}
5959
//=----------------------------------=
6060
// MARK: Result
6161
//=----------------------------------=
62-
let _ = String(bytes: accumulator, encoding: .utf8)
62+
let _ = String(bytes: bytes, encoding: .utf8)
6363
}
6464
}
6565
}

0 commit comments

Comments
 (0)