More minor swiftlint warnings.
This commit is contained in:
@@ -27,7 +27,7 @@ extension MutableCollection where Indices.Iterator.Element == Index {
|
||||
guard c > 1 else { return }
|
||||
|
||||
srand(UInt32(time(nil)))
|
||||
for (firstUnshuffled , unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) {
|
||||
for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) {
|
||||
|
||||
let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount))
|
||||
guard d != 0 else { continue }
|
||||
|
||||
@@ -1165,7 +1165,7 @@ class SocketTests: XCTestCase {
|
||||
|
||||
print("Wrote '\(hello)' to socket...")
|
||||
|
||||
let buf = UnsafeMutablePointer<CChar>.allocate(capacity: 19);
|
||||
let buf = UnsafeMutablePointer<CChar>.allocate(capacity: 19)
|
||||
buf.initialize(to: 0, count: 19)
|
||||
|
||||
defer {
|
||||
@@ -1259,7 +1259,7 @@ class SocketTests: XCTestCase {
|
||||
|
||||
try socket.write(from: "Hello again".data(using: .utf8)!, to: addr!)
|
||||
|
||||
let buf = UnsafeMutablePointer<CChar>.allocate(capacity: 10);
|
||||
let buf = UnsafeMutablePointer<CChar>.allocate(capacity: 10)
|
||||
buf.initialize(to: 0, count: 10)
|
||||
|
||||
// Save room for a null character...
|
||||
|
||||
Reference in New Issue
Block a user