Skip to content

Commit c48e142

Browse files
committed
Small changes
HT @delba Closes #10
1 parent 34add47 commit c48e142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Src/SwiftyTimer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import Foundation
2626

2727
private class NSTimerActor {
28-
var block: () -> Void
28+
let block: () -> Void
2929

3030
init(_ block: () -> Void) {
3131
self.block = block
@@ -81,7 +81,7 @@ extension NSTimer {
8181
/// Specify `runLoop` or `modes` to override these defaults.
8282

8383
public func start(runLoop runLoop: NSRunLoop = NSRunLoop.currentRunLoop(), modes: String...) {
84-
let modes = modes.count != 0 ? modes : [NSDefaultRunLoopMode]
84+
let modes = modes.isEmpty ? [NSDefaultRunLoopMode] : modes
8585

8686
for mode in modes {
8787
runLoop.addTimer(self, forMode: mode)

0 commit comments

Comments
 (0)