diff options
| author | jan <jan@ruken.pw> | 2016-10-01 18:00:20 (UTC) |
|---|---|---|
| committer | jan <jan@ruken.pw> | 2016-10-01 18:00:20 (UTC) |
| commit | b8b1da0a95635fe9ed4ba28851906556ccc351a8 (patch) | |
| tree | 85bc00543b3f6175ae77ee85421959fff751d014 /src/character.rs | |
| parent | 6a130458c55de738ecced00989c74cc7125e17fe (diff) | |
fertig.
Diffstat (limited to 'src/character.rs')
| -rw-r--r-- | src/character.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/character.rs b/src/character.rs index 489588e..0630a45 100644 --- a/src/character.rs +++ b/src/character.rs | |||
| @@ -85,7 +85,8 @@ impl Character { | |||
| 85 | let name: &Section = §ions["name".into()]; | 85 | let name: &Section = §ions["name".into()]; |
| 86 | let image: &Section = §ions["image".into()]; | 86 | let image: &Section = §ions["image".into()]; |
| 87 | let misc: &Section = §ions["misc".into()]; | 87 | let misc: &Section = §ions["misc".into()]; |
| 88 | 88 | let tags: &Section = §ions["tags".into()]; | |
| 89 | |||
| 89 | self.name.romaji = name.data["romaji".into()].clone(); | 90 | self.name.romaji = name.data["romaji".into()].clone(); |
| 90 | self.name.japanese = name.data["japanese".into()].clone(); | 91 | self.name.japanese = name.data["japanese".into()].clone(); |
| 91 | 92 | ||
| @@ -96,7 +97,9 @@ impl Character { | |||
| 96 | self.image.thumb = image.data["thumb".into()].clone(); | 97 | self.image.thumb = image.data["thumb".into()].clone(); |
| 97 | self.image.full = image.data["full".into()].clone(); | 98 | self.image.full = image.data["full".into()].clone(); |
| 98 | 99 | ||
| 99 | self.tags = tags::parse(&(§ions["tags".into()] as &Section).data["tags_raw".into()]); | 100 | if tags.data.contains_key("tags_raw".into()) { |
| 101 | self.tags = tags::parse(&tags.data["tags_raw".into()]); | ||
| 102 | } | ||
| 100 | 103 | ||
| 101 | self.traits.official = dl_list::parse(&(§ions["traits"] as &Section).data["official_raw".into()]); | 104 | self.traits.official = dl_list::parse(&(§ions["traits"] as &Section).data["official_raw".into()]); |
| 102 | self.traits.indexed = dl_list::parse(&(§ions["traits"] as &Section).data["indexed_raw".into()]); | 105 | self.traits.indexed = dl_list::parse(&(§ions["traits"] as &Section).data["indexed_raw".into()]); |
