Skip to content

Commit 137c360

Browse files
committed
[swiftlint] Fix: Else and catch should be on the same line
warning: Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration.
1 parent 2c51d13 commit 137c360

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

DiningPhilosophers/Sources/main.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ struct ForkPair {
2222
if leftIndex > rightIndex {
2323
leftFork = ForkPair.forksSemaphore[leftIndex]
2424
rightFork = ForkPair.forksSemaphore[rightIndex]
25-
}
26-
else {
25+
} else {
2726
leftFork = ForkPair.forksSemaphore[rightIndex]
2827
rightFork = ForkPair.forksSemaphore[leftIndex]
2928
}

Skip-List/SkipList.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ extension SkipList {
118118
if value.key == key {
119119
isFound = true
120120
break
121-
}
122-
else {
121+
} else {
123122
if key < value.key! {
124123
currentNode = node.down
125124
} else {

0 commit comments

Comments
 (0)