From 6eb1375e4e6dccfd6a70d75ac74f8c7fc572b2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 4 Apr 2022 10:28:48 +0200 Subject: [PATCH] http_protocol: skip serializing AnnounceResponse.warning_message if None --- aquatic_http_protocol/src/response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquatic_http_protocol/src/response.rs b/aquatic_http_protocol/src/response.rs index baf511f..36cdc30 100644 --- a/aquatic_http_protocol/src/response.rs +++ b/aquatic_http_protocol/src/response.rs @@ -51,7 +51,7 @@ pub struct AnnounceResponse { pub peers: ResponsePeerListV4, #[serde(default)] pub peers6: ResponsePeerListV6, - #[serde(rename = "warning message")] + #[serde(rename = "warning message", skip_serializing_if = "Option::is_none")] pub warning_message: Option, }