fix(door): Ensure compatibility with updated FSM trait

This commit is contained in:
Vincent Ambo 2018-12-13 15:08:26 +01:00
parent e801b5853c
commit 42d56713bd

View file

@ -262,7 +262,7 @@ impl FSM for DoorState {
// Additionally the `act` function can return new events. This is useful for // Additionally the `act` function can return new events. This is useful for
// a sort of "callback-like" pattern (cause an action to fetch some data, // a sort of "callback-like" pattern (cause an action to fetch some data,
// receive it as an event) but is not used in this example. // receive it as an event) but is not used in this example.
fn act(action: DoorAction, _state: ()) -> Result<Vec<DoorEvent>, failure::Error> { fn act(action: DoorAction, _state: &()) -> Result<Vec<DoorEvent>, failure::Error> {
match action { match action {
DoorAction::NotifyIRC(msg) => { DoorAction::NotifyIRC(msg) => {
use std::fs::OpenOptions; use std::fs::OpenOptions;