Skip to content

Commit c67a277

Browse files
committed
[swiftlint] Fix violation: operator_whitespace
warning: Operator Function Whitespace Violation: Operators should be surrounded by a single whitespace when defining them. Apple has also used spacing in The Swift Programming Language book https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html#//apple_ref/doc/uid/TP40014097-CH27-ID42
1 parent 9107542 commit c67a277

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

QuadTree/Tests/Tests/Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extension Point: Equatable {
1212

1313
}
1414

15-
public func ==(lhs: Point, rhs: Point) -> Bool {
15+
public func == (lhs: Point, rhs: Point) -> Bool {
1616
return lhs.x == rhs.x && lhs.y == rhs.y
1717
}
1818

Strassen Matrix Multiplication/StrassensMatrixMultiplication.playground/Sources/Matrix.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct Matrix<T: Number> {
1919
public struct Size: Equatable {
2020
let rows: Int, columns: Int
2121

22-
public static func ==(lhs: Size, rhs: Size) -> Bool {
22+
public static func == (lhs: Size, rhs: Size) -> Bool {
2323
return lhs.columns == rhs.columns && lhs.rows == rhs.rows
2424
}
2525
}

Strassen Matrix Multiplication/StrassensMatrixMultiplication.playground/Sources/Number.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public protocol Number: Multipliable, Addable {
1313
}
1414

1515
public protocol Addable {
16-
static func +(lhs: Self, rhs: Self) -> Self
17-
static func -(lhs: Self, rhs: Self) -> Self
16+
static func + (lhs: Self, rhs: Self) -> Self
17+
static func - (lhs: Self, rhs: Self) -> Self
1818
}
1919

2020
public protocol Multipliable {
21-
static func *(lhs: Self, rhs: Self) -> Self
21+
static func * (lhs: Self, rhs: Self) -> Self
2222
}
2323

2424
extension Int: Number {

Treap/TreapCollectionType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension Treap: MutableCollection {
8585

8686
public struct TreapIndex<Key: Comparable>: Comparable {
8787

88-
public static func <(lhs: TreapIndex<Key>, rhs: TreapIndex<Key>) -> Bool {
88+
public static func < (lhs: TreapIndex<Key>, rhs: TreapIndex<Key>) -> Bool {
8989
return lhs.keyIndex < rhs.keyIndex
9090
}
9191

0 commit comments

Comments
 (0)