| @@ -36,7 +36,7 @@ pub fn start_linked() -> Subject<Msg> / <proc, ffi, random> { |
| 36 | 36 | store |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | | −fn on_message(state: State, msg: Msg) -> actor.Next<State> / <proc, random, io, ffi> { |
| 39 | +fn on_message(state: State, msg: Msg) -> actor.Next<State> / <proc, random> { |
| 40 | 40 | match msg { |
| 41 | 41 | FindUser(name, reply) -> { |
| 42 | 42 | process.send(reply, dict.get(state.users, name)) |
| @@ -66,7 +66,7 @@ fn on_message(state: State, msg: Msg) -> actor.Next<State> / <proc, random, io, |
| 66 | 66 | // test's own, and read the reply back. |
| 67 | 67 | |
| 68 | 68 | /// The reply `send` gets, and the state after it. |
| 69 | | −fn ask(state: State, send: fn(Subject<r>) -> Msg) -> (r, State) / <proc, random, io, ffi> { |
| 69 | +fn ask(state: State, send: fn(Subject<r>) -> Msg) -> (r, State) / <proc, random> { |
| 70 | 70 | let reply = process.subject() |
| 71 | 71 | match on_message(state, send(reply)) { |
| 72 | 72 | Continue(next) -> |
| @@ -84,7 +84,7 @@ fn with_ada() -> State { |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | @test |
| 87 | | −fn a_taken_name_keeps_its_first_user() -> () / <proc, random, io, ffi> { |
| 87 | +fn a_taken_name_keeps_its_first_user() -> () / <proc, random> { |
| 88 | 88 | let (added, state) = ask(with_ada(), AddUser(User("ada", "h2"), _)) |
| 89 | 89 | assert(added |> result.is_error, "refused") |
| 90 | 90 | let (found, _) = ask(state, FindUser("ada", _)) |
| @@ -92,7 +92,7 @@ fn a_taken_name_keeps_its_first_user() -> () / <proc, random, io, ffi> { |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | @test |
| 95 | | −fn a_new_user_can_be_found() -> () / <proc, random, io, ffi> { |
| 95 | +fn a_new_user_can_be_found() -> () / <proc, random> { |
| 96 | 96 | let (added, state) = ask(with_ada(), AddUser(User("bob", "h2"), _)) |
| 97 | 97 | assert(added |> result.is_ok, "added") |
| 98 | 98 | let (found, _) = ask(state, FindUser("bob", _)) |
| @@ -100,7 +100,7 @@ fn a_new_user_can_be_found() -> () / <proc, random, io, ffi> { |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | @test |
| 103 | | −fn a_new_session_names_its_user() -> () / <proc, random, io, ffi> { |
| 103 | +fn a_new_session_names_its_user() -> () / <proc, random> { |
| 104 | 104 | let (token, state) = ask(with_ada(), NewSession("ada", _)) |
| 105 | 105 | assert_equal(string.length(token), 32) |
| 106 | 106 | let (user, _) = ask(state, SessionUser(token, _)) |