Expected String, found &str when matching an optional string
The way you usually convert a &str to a String is to_owned, e.g. “me”.to_owned() However, you can’t do pattern matching on a String. You could expect a success, get a &str from the String then pattern match on that: fn player_starts() -> bool { println!(“Who will start (me/you)”); loop { let input = readline::readline(“>”); match … Read more