diff options
| author | troido <troido@protonmail.com> | 2020-09-24 13:10:54 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-24 13:10:54 +0200 |
| commit | e6476e7afff0234d67ebce7c74e4c91c31d87755 (patch) | |
| tree | 638133c0f7c9253e863e01806150f8bec860d12e /src/item.rs | |
| parent | 523a635dc88bc7890a0e1d3c062a8165259761d6 (diff) | |
actually use the serde serialisation more
Diffstat (limited to 'src/item.rs')
| -rw-r--r-- | src/item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/item.rs b/src/item.rs index 0abf35d..a663634 100644 --- a/src/item.rs +++ b/src/item.rs @@ -51,7 +51,7 @@ impl ItemAction { Some(match typ.as_str()? { "eat" => Eat(arg.as_i64()?), "build" => Build( - Template::from_json(arg.get(0)?).ok()?, + Template::deserialize(arg.get(0)?).ok()?, arg.get(1)?.as_array()?.iter().map(|v| Flag::from_str(v.as_str()?).ok()).collect::<Option<HashSet<Flag>>>()?, arg.get(2)?.as_array()?.iter().map(|v| Flag::from_str(v.as_str()?).ok()).collect::<Option<HashSet<Flag>>>()? ), |
