diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-08 22:10:04 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:31 -0400 |
| commit | 653e2de752a97e377fc9963ba60d9408e7089528 (patch) | |
| tree | a707919c0c0cb3c84ec3ea624ae8cd87059f28ac /src/boot | |
| parent | dd62b823e01934a0f841256fdb17b551091896bf (diff) | |
Flatten nested `channel` and `message` structs in events and API responses.
This structure didn't accomplish anything and made certain refactorings harder.
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<message::Message> for Message { @@ -62,7 +61,8 @@ impl From<message::Message> for Message { Self { sent, sender, - message: Body { id, body }, + id, + body, } } } |
