mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
fix: Satisfy SwiftLint empty_count rule in write() guard
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
[](https://github.com/phranck/TUIKit/actions/workflows/ci.yml)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -170,4 +171,4 @@ Tests/
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
This repository has been published under the [CC-BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.
|
||||
|
||||
@@ -157,7 +157,7 @@ public final class Terminal: @unchecked Sendable {
|
||||
string.utf8CString.withUnsafeBufferPointer { buffer in
|
||||
// buffer includes null terminator — exclude it
|
||||
let count = buffer.count - 1
|
||||
guard count > 0 else { return }
|
||||
guard count >= 1 else { return }
|
||||
buffer.baseAddress!.withMemoryRebound(to: UInt8.self, capacity: count) { pointer in
|
||||
var written = 0
|
||||
while written < count {
|
||||
|
||||
Reference in New Issue
Block a user