Change fromstring to be from string
parent
57fe95889f
commit
d277795e16
|
|
@ -6,7 +6,7 @@ pub struct GameEvent {
|
|||
d: json::JsonValue,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum GameEventType {
|
||||
Null,
|
||||
GameStart,
|
||||
|
|
@ -44,7 +44,7 @@ impl GameEventType {
|
|||
];
|
||||
for c in &cases {
|
||||
if format!("{:?}", c) == s {
|
||||
return *c;
|
||||
return c.clone();
|
||||
}
|
||||
}
|
||||
GameEventType::Null
|
||||
|
|
|
|||
Loading…
Reference in New Issue