}
fn str_to_direction(to_parse: &str) -> RoomDirection {
- match to_parse { //~ ERROR match arms have incompatible types
+ match to_parse {
"w" | "west" => RoomDirection::West,
"e" | "east" => RoomDirection::East,
"n" | "north" => RoomDirection::North,
"down" => RoomDirection::Down,
_ => None
}
+ //~^^ ERROR match arms have incompatible types
}
fn main() {