Apply swift-format changes and CI (#472)

Motivation:

Standardised formatting makes the project cleaner to look at and work
on.

Modifications:

Setup swift-format with the same settings as Swift-NIO

Result:

Common formatting throughout
This commit is contained in:
Peter Adams authored and GitHub committed 2024-10-29 13:09:54 +00:00
1 parent 93586110f2
commit 1118370ec4
125 files changed
+21869 -11457

No files matched your search

+7 -12
View File
@@ -69,14 +69,14 @@ public struct HTTP2PingData: Sendable {
extension HTTP2PingData: RandomAccessCollection, MutableCollection {
public typealias Index = Int
public typealias Element = UInt8
public typealias Element = UInt8
public var startIndex: Index {
return 0
0
}
public var endIndex: Index {
return 7
7
}
public subscript(_ index: Index) -> Element {
@@ -128,15 +128,10 @@ extension HTTP2PingData: RandomAccessCollection, MutableCollection {
}
extension HTTP2PingData: Equatable {
public static func ==(lhs: HTTP2PingData, rhs: HTTP2PingData) -> Bool {
return lhs.bytes.0 == rhs.bytes.0 &&
lhs.bytes.1 == rhs.bytes.1 &&
lhs.bytes.2 == rhs.bytes.2 &&
lhs.bytes.3 == rhs.bytes.3 &&
lhs.bytes.4 == rhs.bytes.4 &&
lhs.bytes.5 == rhs.bytes.5 &&
lhs.bytes.6 == rhs.bytes.6 &&
lhs.bytes.7 == rhs.bytes.7
public static func == (lhs: HTTP2PingData, rhs: HTTP2PingData) -> Bool {
lhs.bytes.0 == rhs.bytes.0 && lhs.bytes.1 == rhs.bytes.1 && lhs.bytes.2 == rhs.bytes.2
&& lhs.bytes.3 == rhs.bytes.3 && lhs.bytes.4 == rhs.bytes.4 && lhs.bytes.5 == rhs.bytes.5
&& lhs.bytes.6 == rhs.bytes.6 && lhs.bytes.7 == rhs.bytes.7
}
}