summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-09-24 18:58:49 +0200
committertroido <troido@protonmail.com>2020-09-24 18:58:49 +0200
commit13b53f3e89bcd6d33a534403162d1b09502bec70 (patch)
tree32347d20893a5c901e64a7003262b5212966ecb1 /src/components
parent5ae2f9040324baaeaed3f91a84662425cb6186dc (diff)
even more serde stuff
Diffstat (limited to 'src/components')
-rw-r--r--src/components/equipment.rs6
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}
);
}