diff options
| author | troido <troido@protonmail.com> | 2020-09-24 18:58:49 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-24 18:58:49 +0200 |
| commit | 13b53f3e89bcd6d33a534403162d1b09502bec70 (patch) | |
| tree | 32347d20893a5c901e64a7003262b5212966ecb1 /src/components | |
| parent | 5ae2f9040324baaeaed3f91a84662425cb6186dc (diff) | |
even more serde stuff
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/equipment.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/equipment.rs b/src/components/equipment.rs index d87502d..cbd482c 100644 --- a/src/components/equipment.rs +++ b/src/components/equipment.rs @@ -90,10 +90,10 @@ mod tests { } #[test] - fn equippable_from_json() { + fn equippable_deserialize() { assert_eq!( - Equippable::from_json(&json!({"slot": "hand", "stats": {"strength": 10}})), - Some(Equippable {slot: Slot::Hand, stats: hashmap!(Stat::Strength => 10), sprite: None}) + Equippable::deserialize(&json!({"slot": "hand", "stats": {"strength": 10}})).unwrap(), + Equippable {slot: Slot::Hand, stats: hashmap!(Stat::Strength => 10), sprite: None} ); } |
