From 653e2de752a97e377fc9963ba60d9408e7089528 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 8 Oct 2024 22:10:04 -0400 Subject: Flatten nested `channel` and `message` structs in events and API responses. This structure didn't accomplish anything and made certain refactorings harder. --- src/channel/event.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/channel/event.rs') diff --git a/src/channel/event.rs b/src/channel/event.rs index 9c54174..9f2e263 100644 --- a/src/channel/event.rs +++ b/src/channel/event.rs @@ -27,6 +27,7 @@ pub enum Kind { #[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)] pub struct Created { + #[serde(flatten)] pub channel: Channel, } @@ -38,7 +39,7 @@ impl From for Kind { #[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)] pub struct Deleted { - pub channel: channel::Id, + pub id: channel::Id, } impl From for Kind { -- cgit v1.2.3