Skip to content

Commit 18c7b43

Browse files
committed
[swiftlint] Fix violation: Colons should be next to the identifier
warning: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals.
1 parent c67a277 commit 18c7b43

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Bucket Sort/BucketSort.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import Foundation
2424
// FIXME: comparison operators with optionals were removed from the Swift Standard Libary.
2525
// Consider refactoring the code to use the non-optional operators.
26-
fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
26+
fileprivate func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
2727
switch (lhs, rhs) {
2828
case let (l?, r?):
2929
return l < r
@@ -36,7 +36,7 @@ fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
3636

3737
// FIXME: comparison operators with optionals were removed from the Swift Standard Libary.
3838
// Consider refactoring the code to use the non-optional operators.
39-
fileprivate func >= <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
39+
fileprivate func >= <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
4040
switch (lhs, rhs) {
4141
case let (l?, r?):
4242
return l >= r

Skip-List/SkipList.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ private func coinFlip() -> Bool {
7171
public class DataNode<Key: Comparable, Payload> {
7272
public typealias Node = DataNode<Key, Payload>
7373

74-
var data : Payload?
75-
fileprivate var key : Key?
76-
var next : Node?
77-
var down : Node?
74+
var data: Payload?
75+
fileprivate var key: Key?
76+
var next: Node?
77+
var down: Node?
7878

7979
public init(key: Key, data: Payload) {
8080
self.key = key
@@ -102,8 +102,8 @@ open class SkipList<Key: Comparable, Payload> {
102102
extension SkipList {
103103

104104
func findNode(key: Key) -> Node? {
105-
var currentNode : Node? = head
106-
var isFound : Bool = false
105+
var currentNode: Node? = head
106+
var isFound: Bool = false
107107

108108
while !isFound {
109109
if let node = currentNode {

0 commit comments

Comments
 (0)