Change fromstring to be from string

master^2
bel 2020-05-03 13:46:36 -06:00
parent 6ac68214ce
commit 1a96918524
1 changed files with 2 additions and 2 deletions

View File

@ -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