File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ internal final class TimeoutConstraint: JobConstraint {
38
38
}
39
39
40
40
operation. dispatchQueue. runAfter ( timeout) {
41
- if ( operation. isExecuting && !operation. isFinished) {
41
+ if operation. isExecuting && !operation. isFinished {
42
42
operation. cancel ( with: SwiftQueueError . timeout)
43
43
}
44
44
}
Original file line number Diff line number Diff line change @@ -92,23 +92,23 @@ public struct JobInfo {
92
92
93
93
constraints. append ( UniqueUUIDConstraint ( ) )
94
94
95
- if ( requireCharging) {
95
+ if requireCharging {
96
96
constraints. append ( BatteryChargingConstraint ( ) )
97
97
}
98
98
99
- if ( deadline != nil ) {
99
+ if deadline != nil {
100
100
constraints. append ( DeadlineConstraint ( ) )
101
101
}
102
102
103
- if ( delay != nil ) {
103
+ if delay != nil {
104
104
constraints. append ( DelayConstraint ( ) )
105
105
}
106
106
107
- if ( requireNetwork != NetworkType . any) {
107
+ if requireNetwork != NetworkType . any {
108
108
constraints. append ( NetworkConstraint ( ) )
109
109
}
110
110
111
- if ( timeout != nil ) {
111
+ if timeout != nil {
112
112
constraints. append ( TimeoutConstraint ( ) )
113
113
}
114
114
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ class ConstraintTests: XCTestCase {
51
51
var runCount = 0
52
52
53
53
let job = TestJob ( retry: . retry( delay: 0 ) ) {
54
- runCount = runCount + 1
55
- if ( runCount == runLimit) {
54
+ runCount += 1
55
+ if runCount == runLimit {
56
56
$0. done ( . fail( JobError ( ) ) )
57
57
} else {
58
58
$0. done ( . success)
@@ -116,8 +116,8 @@ class ConstraintTests: XCTestCase {
116
116
var runCount = 0
117
117
118
118
let job = TestJob ( retry: . retry( delay: 0 ) ) {
119
- runCount = runCount + 1
120
- if ( runCount == runLimit) {
119
+ runCount += 1
120
+ if runCount == runLimit {
121
121
$0. done ( . success)
122
122
} else {
123
123
$0. done ( . fail( JobError ( ) ) )
You can’t perform that action at this time.
0 commit comments