gameServer2/src/protocol/parser.rs
changeset 14355 31717e1436cd
parent 13810 0463a4221327
equal deleted inserted replaced
14354:d35e0fdb70f6 14355:31717e1436cd
   198                 value: opt_param >>
   198                 value: opt_param >>
   199                 (GameCfg::Ammo(name, value)))
   199                 (GameCfg::Ammo(name, value)))
   200     | do_parse!(tag!("SCHEME")   >> eol >>
   200     | do_parse!(tag!("SCHEME")   >> eol >>
   201                 name: a_line     >>
   201                 name: a_line     >>
   202                 values: opt!(preceded!(eol, separated_list!(eol, a_line))) >>
   202                 values: opt!(preceded!(eol, separated_list!(eol, a_line))) >>
   203                 (GameCfg::Scheme(name, values.unwrap_or(Vec::new()))))
   203                 (GameCfg::Scheme(name, values.unwrap_or_default())))
   204     | do_parse!(tag!("FEATURE_SIZE") >> eol >>
   204     | do_parse!(tag!("FEATURE_SIZE") >> eol >>
   205                 value: u32_line    >>
   205                 value: u32_line    >>
   206                 (GameCfg::FeatureSize(value)))
   206                 (GameCfg::FeatureSize(value)))
   207     | do_parse!(tag!("MAP")      >> eol >>
   207     | do_parse!(tag!("MAP")      >> eol >>
   208                 value: a_line    >>
   208                 value: a_line    >>