macros: Fix errors from unused serde attributes with only server feature active

This commit is contained in:
Jonas Platte 2022-03-25 12:26:52 +01:00
parent 7bef8ea5ef
commit 05ad164d21
No known key found for this signature in database
GPG Key ID: BBA95679259D342F
2 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ impl Request {
quote! {
/// Data in the request body.
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi)]
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi, #ruma_macros::_FakeDeriveSerde)]
#[cfg_attr(feature = "client", derive(#serde::Serialize))]
#[cfg_attr(
feature = "server",
@ -241,7 +241,7 @@ impl Request {
quote! {
/// Data in the request's query string.
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi)]
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi, #ruma_macros::_FakeDeriveSerde)]
#[cfg_attr(feature = "client", derive(#serde::Serialize))]
#[cfg_attr(
feature = "server",

View File

@ -110,7 +110,7 @@ impl Response {
quote! {
/// Data in the response body.
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi)]
#[derive(Debug, #ruma_macros::_FakeDeriveRumaApi, #ruma_macros::_FakeDeriveSerde)]
#serde_derives
#serde_attr
struct ResponseBody { #(#fields),* }