diff --git a/client/src/announcer/test/mod.rs b/client/src/announcer/test/mod.rs index 7879e9f..2db80d3 100644 --- a/client/src/announcer/test/mod.rs +++ b/client/src/announcer/test/mod.rs @@ -9,24 +9,12 @@ mod t09; use super::*; use crate::testing::DummyScheduleServer; -use serde_json::Value; -use std::collections::HashMap; use tokio::time::{Duration, Instant}; -fn set_and_patch_dummy_events( - server: &mut DummyScheduleServer, - mut events: Vec, -) -> Vec { +fn set_and_patch_dummy_events(server: &mut DummyScheduleServer, events: Vec) -> Vec { // Load the events into the dummy/test server. server.set_events(events.clone()); - // Add "type" to extra fields to ensure equality checking works as expected. - // In theory this should not be needed, I assume there is some funkyness going on with the fact - // this field is renamed by serde. - for event in events.iter_mut() { - event.extra = HashMap::from([("type".to_string(), Value::String("talk".to_string()))]); - } - // Return the patched events for comparisons. events } diff --git a/client/src/schedule/event/mod.rs b/client/src/schedule/event/mod.rs index 5f10ce8..a5cf59e 100644 --- a/client/src/schedule/event/mod.rs +++ b/client/src/schedule/event/mod.rs @@ -3,9 +3,8 @@ mod timestamp; use chrono::{DateTime, FixedOffset}; use serde::{Deserialize, Serialize}; -use serde_json::Value; use serde_with::{serde_as, NoneAsEmptyString}; -use std::{cmp::Ordering, collections::HashMap}; +use std::cmp::Ordering; use url::Url; pub use self::kind::{Kind, Workshop}; @@ -45,9 +44,6 @@ pub struct Event { pub is_family_friendly: Option, pub link: Url, - - #[serde(flatten)] - pub extra: HashMap, } impl Event { @@ -72,7 +68,6 @@ impl Event { may_record: None, is_family_friendly: None, link: Url::parse("http://example.com").unwrap(), - extra: HashMap::default(), } }