Skip to content

Commit 1dc8066

Browse files
chore: format code
1 parent 504fd29 commit 1dc8066

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

Sources/Queuer/ConcurrentOperation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ open class ConcurrentOperation: Operation {
9393

9494
/// Specify if the `Operation` should retry another time.
9595
internal var shouldRetry = true
96-
96+
9797
/// Manually control the `finish(success:)` call of the `Operation`.
9898
/// If set to `true` it is the developer's responsibility to call the `finish(success:)` method,
9999
/// either by passing `false` or `true` to the function.
@@ -191,16 +191,16 @@ open class ConcurrentOperation: Operation {
191191
}
192192

193193
/// `ConcurrentOperation` extension with queue handling.
194-
public extension ConcurrentOperation {
194+
extension ConcurrentOperation {
195195
/// Adds the `Operation` to `shared` Queuer.
196-
func addToSharedQueuer() {
196+
public func addToSharedQueuer() {
197197
Queuer.shared.addOperation(self)
198198
}
199199

200200
/// Adds the `Operation` to the custom queue.
201201
///
202202
/// - Parameter queue: Custom queue where the `Operation` will be added.
203-
func addToQueue(_ queue: Queuer) {
203+
public func addToQueue(_ queue: Queuer) {
204204
queue.addOperation(self)
205205
}
206206
}

Sources/Queuer/Queuer.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,18 @@ public class Queuer {
126126
// MARK: - Queuer Operations and Chaining
127127

128128
/// `Queuer` extension with `Operation`s and chaining handling.
129-
public extension Queuer {
129+
extension Queuer {
130130
/// Add an `Operation` to be executed asynchronously.
131131
///
132132
/// - Parameter block: Block to be executed.
133-
func addOperation(_ operation: @escaping () -> Void) {
133+
public func addOperation(_ operation: @escaping () -> Void) {
134134
queue.addOperation(operation)
135135
}
136136

137137
/// Add an `Operation` to be executed asynchronously.
138138
///
139139
/// - Parameter operation: `Operation` to be executed.
140-
func addOperation(_ operation: Operation) {
140+
public func addOperation(_ operation: Operation) {
141141
queue.addOperation(operation)
142142
}
143143

@@ -151,7 +151,7 @@ public extension Queuer {
151151
/// - operations: `Operation`s Array.
152152
/// - completionHandler: Completion block to be executed when all `Operation`s
153153
/// are finished.
154-
func addChainedOperations(_ operations: [Operation], completionHandler: (() -> Void)? = nil) {
154+
public func addChainedOperations(_ operations: [Operation], completionHandler: (() -> Void)? = nil) {
155155
for (index, operation) in operations.enumerated() {
156156
if index > 0 {
157157
operation.addDependency(operations[index - 1])
@@ -177,14 +177,14 @@ public extension Queuer {
177177
/// - operations: `Operation`s list.
178178
/// - completionHandler: Completion block to be exectuted when all `Operation`s
179179
/// are finished.
180-
func addChainedOperations(_ operations: Operation..., completionHandler: (() -> Void)? = nil) {
180+
public func addChainedOperations(_ operations: Operation..., completionHandler: (() -> Void)? = nil) {
181181
addChainedOperations(operations, completionHandler: completionHandler)
182182
}
183183

184184
/// Add a completion block to the queue.
185185
///
186186
/// - Parameter completionHandler: Completion handler to be executed as last `Operation`.
187-
func addCompletionHandler(_ completionHandler: @escaping () -> Void) {
187+
public func addCompletionHandler(_ completionHandler: @escaping () -> Void) {
188188
let completionOperation = BlockOperation(block: completionHandler)
189189
if let lastOperation = operations.last {
190190
completionOperation.addDependency(lastOperation)

Tests/QueuerTests/QueuerTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ final class QueuerTests: XCTestCase {
9595
Queuer.shared.addOperation(concurrentOperation1)
9696
Queuer.shared.addOperation(concurrentOperation2)
9797

98-
9998
waitForExpectations(timeout: 5) { error in
10099
XCTAssertNil(error)
101100
XCTAssertEqual(testString, "Tested2")

Tests/QueuerTests/SchedulerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ final class SchedulerTests: XCTestCase {
5555
if CIHelper.isNotRunningOnCI() {
5656
let testExpectation = expectation(description: "Init With Handler")
5757
var order: [Int] = []
58-
58+
5959
let schedule = Scheduler(deadline: .now(), repeating: .never) {
6060
order.append(0)
6161
}
62-
62+
6363
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(3500)) {
6464
testExpectation.fulfill()
6565
}
66-
66+
6767
waitForExpectations(timeout: 5) { error in
6868
XCTAssertNil(error)
6969
XCTAssertEqual(order, [0])

0 commit comments

Comments
 (0)