macros: Don't generate unused Outgoing structs

They are only needed when the server feature is active.
This commit is contained in:
Jonas Platte 2022-03-21 11:25:20 +01:00 committed by Jonas Platte
parent 11ef863bf0
commit e3a8b6b81f

View File

@ -217,10 +217,10 @@ impl Request {
#[derive(
Debug,
#ruma_macros::_FakeDeriveRumaApi,
#ruma_common::serde::Outgoing,
#serde::Serialize,
#derive_deserialize
)]
#[cfg_attr(feature = "server", derive(#ruma_common::serde::Outgoing))]
#serde_attr
struct RequestBody< #(#lifetimes),* > { #(#fields),* }
}
@ -245,10 +245,10 @@ impl Request {
#[derive(
Debug,
#ruma_macros::_FakeDeriveRumaApi,
#ruma_common::serde::Outgoing,
#serde::Serialize,
#derive_deserialize
)]
#[cfg_attr(feature = "server", derive(#ruma_common::serde::Outgoing))]
struct RequestQuery< #(#lifetimes),* > #def
}
});