changeset 13524 | 5359ff75da3a |
parent 13521 | ba5211dddb21 |
child 13666 | 09f4a30e50cc |
--- a/gameServer2/src/server/handlers/common.rs Tue Jul 17 00:27:24 2018 +0300 +++ b/gameServer2/src/server/handlers/common.rs Tue Jul 17 16:03:34 2018 +0300 @@ -4,7 +4,7 @@ use rand::{self, Rng, thread_rng}; use server::{actions::Action, server::HWServer}; -pub fn rnd_reply(options: &Vec<String>) -> HWServerMessage { +pub fn rnd_reply(options: &[String]) -> HWServerMessage { let mut rng = thread_rng(); let reply = if options.is_empty() { (*rng.choose(&["heads", "tails"]).unwrap()).to_owned()