From 7c833958d8f22aeecaf7fbb61d9e507d0b50e700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sat, 16 Oct 2021 01:19:18 +0200 Subject: [PATCH] aquatic_ws: add serde-rename for ErrorResponse.failure_reason --- aquatic_ws_protocol/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aquatic_ws_protocol/src/lib.rs b/aquatic_ws_protocol/src/lib.rs index 62d6d58..f050730 100644 --- a/aquatic_ws_protocol/src/lib.rs +++ b/aquatic_ws_protocol/src/lib.rs @@ -232,10 +232,12 @@ pub enum ErrorResponseAction { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ErrorResponse { + #[serde(rename = "failure reason")] pub failure_reason: Cow<'static, str>, /// Action of original request #[serde(skip_serializing_if = "Option::is_none")] pub action: Option, + // Should not be renamed #[serde(skip_serializing_if = "Option::is_none")] pub info_hash: Option, }