Skip to content

Commit b53a7a4

Browse files
committed
Fix SwiftLint violations
- Add trailing newlines to files missing them - Fix operator spacing violations (== needs spaces around it) - Remove unneeded synthesized initializers - All files now pass SwiftLint strict mode
1 parent 342ad7d commit b53a7a4

File tree

6 files changed

+6
-20
lines changed

6 files changed

+6
-20
lines changed

Sources/IEEE 754/Double+IEEE_754.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ extension Double {
3838
/// and properties for Double values.
3939
public struct IEEE754: Sendable {
4040
public let double: Double
41-
42-
init(double: Double) {
43-
self.double = double
44-
}
4541
}
4642
}
4743

Sources/IEEE 754/Float+IEEE_754.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ extension Float {
3838
/// and properties for Float values.
3939
public struct IEEE754: Sendable {
4040
public let float: Float
41-
42-
init(float: Float) {
43-
self.float = float
44-
}
4541
}
4642
}
4743

Sources/IEEE 754/IEEE_754.Arithmetic.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,3 @@ extension IEEE_754.Arithmetic {
272272
-value
273273
}
274274
}
275-

Sources/IEEE 754/[UInt8]+IEEE_754.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ extension [UInt8] {
3232
/// converting Float and Double values to byte arrays.
3333
public struct IEEE754: Sendable {
3434
public let bytes: [UInt8]
35-
36-
init(bytes: [UInt8]) {
37-
self.bytes = bytes
38-
}
3935
}
4036
}
4137

Tests/IEEE 754 Tests/IEEE_754.Comparison Tests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ struct DoubleTotalOrderTests {
148148
@Test func completeOrdering() {
149149
// totalOrder defines a complete ordering: -NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN
150150
let values: [Double] = [-Double.infinity, -100.0, -1.0, -0.0, 0.0, 1.0, 100.0, Double.infinity]
151-
for i in 0..<values.count-1 {
152-
#expect(IEEE_754.Comparison.totalOrder(values[i], values[i+1]),
153-
"\(values[i]) should be ordered before \(values[i+1])")
151+
for i in 0..<values.count - 1 {
152+
#expect(IEEE_754.Comparison.totalOrder(values[i], values[i + 1]),
153+
"\(values[i]) should be ordered before \(values[i + 1])")
154154
}
155155
}
156156
}
@@ -271,9 +271,9 @@ struct FloatTotalOrderTests {
271271

272272
@Test func completeOrdering() {
273273
let values: [Float] = [-Float.infinity, Float(-100.0), Float(-1.0), Float(-0.0), Float(0.0), Float(1.0), Float(100.0), Float.infinity]
274-
for i in 0..<values.count-1 {
275-
#expect(IEEE_754.Comparison.totalOrder(values[i], values[i+1]),
276-
"\(values[i]) should be ordered before \(values[i+1])")
274+
for i in 0..<values.count - 1 {
275+
#expect(IEEE_754.Comparison.totalOrder(values[i], values[i + 1]),
276+
"\(values[i]) should be ordered before \(values[i + 1])")
277277
}
278278
}
279279
}

Tests/IEEE 754 Tests/IEEE_754.MinMax Tests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,3 @@ struct MinMaxOperationTests {
297297
}
298298
}
299299
}
300-

0 commit comments

Comments
 (0)