diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-16 15:43:10 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-16 15:43:10 +0400 |
| commit | 0f90d0f3d30a728457e6bc5c4d1d933a8014e099 (patch) | |
| tree | b1468081a32546e8d01fba622f978cdd326cf6fd /libs/shared/src/payloads.rs | |
| parent | 277f38bbe89e4db57b73a4e28bf1be2f5c50ce27 (diff) | |
new build system
Diffstat (limited to 'libs/shared/src/payloads.rs')
| -rw-r--r-- | libs/shared/src/payloads.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libs/shared/src/payloads.rs b/libs/shared/src/payloads.rs index a4818e6..2b37617 100644 --- a/libs/shared/src/payloads.rs +++ b/libs/shared/src/payloads.rs @@ -9,7 +9,6 @@ use tracing::trace_span; use twilight_model::gateway::event::{DispatchEvent, DispatchEventWithTypeDeserializer}; #[derive(Debug, Clone, PartialEq)] -#[repr(transparent)] pub struct DispatchEventTagged(pub DispatchEvent); impl Deref for DispatchEventTagged { @@ -76,12 +75,11 @@ mod tests { #[test] fn serialize_event_tagged() { - let dispatch_event = DispatchEvent::GiftCodeUpdate; + let dispatch_event = DispatchEventTagged(DispatchEvent::GiftCodeUpdate); let value = serde_json::to_value(&dispatch_event); assert!(value.is_ok()); let value = value.unwrap(); - let kind = value.get("t").and_then(serde_json::Value::as_str); assert_eq!(kind, Some("GIFT_CODE_UPDATE")); } |
