aboutsummaryrefslogtreecommitdiffstats
path: root/meetup
diff options
context:
space:
mode:
authorTeddy Wing2018-04-15 01:08:15 +0200
committerTeddy Wing2018-04-15 01:08:15 +0200
commitaa0190279db75f75210f5279afaa62178b242837 (patch)
tree81eb9a5c228fdb70e135976b51a8aa9d47439337 /meetup
parent2140a2f63ce6f8da3684806d814d905987013de5 (diff)
downloadmeetup-find-events-rss-aa0190279db75f75210f5279afaa62178b242837.tar.bz2
Event: Make `description`, `local_date`, `local_time` optional
After making a request to the API and getting a real JSON response again, it turns out that the above mentioned fields are actually optional, and will break Serde's parsing when they're not in the JSON string coming from Meetup. Make these fields `Option`s so the program doesn't break when they're not there.
Diffstat (limited to 'meetup')
-rw-r--r--meetup/src/event.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/meetup/src/event.rs b/meetup/src/event.rs
index 1f90429..d25c1d2 100644
--- a/meetup/src/event.rs
+++ b/meetup/src/event.rs
@@ -1,10 +1,10 @@
#[derive(Debug, Deserialize, PartialEq)]
pub struct Event {
pub name: String,
- pub description: String,
+ pub description: Option<String>,
pub link: String,
- pub local_date: String,
- pub local_time: String,
+ pub local_date: Option<String>,
+ pub local_time: Option<String>,
// venue struct
}