Skip to content

Commit c0bc261

Browse files
committed
Merge remote-tracking branch 'origin/master' into swift/2.0
2 parents 5834968 + fc2e0cf commit c0bc261

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ enum MyState: StateType {
2323
let machine = StateMachine<MyState, MyEvent>(state: .State0) { machine in
2424

2525
machine.addRoute(.State0 => .State1)
26-
machine.addRoute(nil => .State2) { context in println("Any => 2, msg=\(context.userInfo!)") }
27-
machine.addRoute(.State2 => nil) { context in println("2 => Any, msg=\(context.userInfo!)") }
26+
machine.addRoute(nil => .State2) { context in print("Any => 2, msg=\(context.userInfo)") }
27+
machine.addRoute(.State2 => nil) { context in print("2 => Any, msg=\(context.userInfo)") }
2828

2929
// add handler (handlerContext = (event, transition, order, userInfo))
3030
machine.addHandler(.State0 => .State1) { context in
31-
println("0 => 1")
31+
print("0 => 1")
3232
}
3333

3434
// add errorHandler
3535
machine.addErrorHandler { (event, transition, order, userInfo) in
36-
println("[ERROR] \(transition.fromState) => \(transition.toState)")
36+
print("[ERROR] \(transition.fromState) => \(transition.toState)")
3737
}
3838
}
3939

@@ -43,7 +43,7 @@ machine <- (.State2, "Hello")
4343
machine <- (.State1, "Bye")
4444
machine <- .State0 // fail: no 1 => 0
4545

46-
println("machine.state = \(machine.state)")
46+
print("machine.state = \(machine.state)")
4747
```
4848

4949
This will print:

SwiftStateTests/BasicTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class BasicTests: _TestCase
1616
let machine = StateMachine<MyState, MyEvent>(state: .State0) { machine in
1717

1818
machine.addRoute(.State0 => .State1)
19-
machine.addRoute(nil => .State2) { context in print("Any => 2, msg=\(context.userInfo!)") }
20-
machine.addRoute(.State2 => nil) { context in print("2 => Any, msg=\(context.userInfo!)") }
19+
machine.addRoute(nil => .State2) { context in print("Any => 2, msg=\(context.userInfo)") }
20+
machine.addRoute(.State2 => nil) { context in print("2 => Any, msg=\(context.userInfo)") }
2121

2222
// add handler (handlerContext = (event, transition, order, userInfo))
2323
machine.addHandler(.State0 => .State1) { context in

0 commit comments

Comments
 (0)