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/boot/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/boot') diff --git a/src/boot/mod.rs b/src/boot/mod.rs index bd0da0a..a68acac 100644 --- a/src/boot/mod.rs +++ b/src/boot/mod.rs @@ -44,9 +44,8 @@ pub struct Message { #[serde(flatten)] pub sent: Instant, pub sender: Login, - // Named this way for serialization reasons - #[allow(clippy::struct_field_names)] - pub message: Body, + pub id: message::Id, + pub body: String, } impl From for Message { @@ -62,7 +61,8 @@ impl From for Message { Self { sent, sender, - message: Body { id, body }, + id, + body, } } } -- cgit v1.2.3