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