Skip to content

Commit eae082d

Browse files
committed
Rename writeInt to be more clear
1 parent 770fd4b commit eae082d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/PrettyStackTrace/PrettyStackTrace.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ let numberBuffer: UnsafeMutablePointer<Int8> = {
7979
/// doesn't write outside the bounds of the buffer.
8080
/// It then writes the contents of this buffer, starting at the first space at
8181
/// the beginning, to stderr.
82-
func writeInt(_ int: UInt) {
82+
private func writeLeadingSpacesAndStackPosition(_ int: UInt) {
8383
// We can't write more than 8 digits.
8484
guard int <= 99_999_999 else { return }
8585
var int = int
@@ -166,7 +166,7 @@ private class PrettyStackTraceManager {
166166
var i: UInt = 1
167167
var cur = stack
168168
while cur != nil {
169-
writeInt(i)
169+
writeLeadingSpacesAndStackPosition(i)
170170
let entry = cur.unsafelyUnwrapped
171171
write(STDERR_FILENO, entry.pointee.data, entry.pointee.count)
172172
cur = entry.pointee.prev

0 commit comments

Comments
 (0)