From 04427f13788fd22d60fdb6811c24363aad39c157 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 20 Jun 2022 09:29:51 +0200 Subject: [PATCH] Make some booleans default to false --- cove-tui/src/euph/api/types.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cove-tui/src/euph/api/types.rs b/cove-tui/src/euph/api/types.rs index a3ccb10..03849d8 100644 --- a/cove-tui/src/euph/api/types.rs +++ b/cove-tui/src/euph/api/types.rs @@ -55,7 +55,8 @@ pub struct Message { /// If true, then the full content of this message is not included (see /// [`GetMessage`](super::GetMessage) to obtain the message with full /// content). - pub truncated: Option, + #[serde(default)] + pub truncated: bool, } /// The type of a packet. @@ -254,9 +255,11 @@ pub struct SessionView { /// Id of the session, unique across all sessions globally. pub session_id: String, /// If true, this session belongs to a member of staff. - pub is_staff: Option, + #[serde(default)] + pub is_staff: bool, /// If true, this session belongs to a manager of the room. - pub is_manager: Option, + #[serde(default)] + pub is_manager: bool, /// For hosts and staff, the virtual address of the client. pub client_address: Option, /// For staff, the real address of the client.