api-macros: Silence clippy::inconsistent_struct_constructor in generated code

This commit is contained in:
Jonas Platte 2021-04-12 20:01:31 +02:00
parent 15433a9751
commit 15d92728ca
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
4 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,7 @@ impl Request {
quote! { quote! {
#[automatically_derived] #[automatically_derived]
#[cfg(feature = "server")] #[cfg(feature = "server")]
#[allow(clippy::inconsistent_struct_constructor)]
impl #ruma_api::IncomingRequest for #incoming_request_type { impl #ruma_api::IncomingRequest for #incoming_request_type {
type EndpointError = #error_ty; type EndpointError = #error_ty;
type OutgoingResponse = Response; type OutgoingResponse = Response;

View File

@ -190,6 +190,7 @@ impl Request {
quote! { quote! {
#[automatically_derived] #[automatically_derived]
#[cfg(feature = "client")] #[cfg(feature = "client")]
#[allow(clippy::inconsistent_struct_constructor)]
impl #lifetimes #ruma_api::OutgoingRequest for Request #lifetimes { impl #lifetimes #ruma_api::OutgoingRequest for Request #lifetimes {
type EndpointError = #error_ty; type EndpointError = #error_ty;
type IncomingResponse = <Response as #ruma_serde::Outgoing>::Incoming; type IncomingResponse = <Response as #ruma_serde::Outgoing>::Incoming;

View File

@ -116,6 +116,7 @@ impl Response {
quote! { quote! {
#[automatically_derived] #[automatically_derived]
#[cfg(feature = "client")] #[cfg(feature = "client")]
#[allow(clippy::inconsistent_struct_constructor)]
impl #ruma_api::IncomingResponse for Response { impl #ruma_api::IncomingResponse for Response {
type EndpointError = #error_ty; type EndpointError = #error_ty;

View File

@ -70,6 +70,7 @@ impl Response {
quote! { quote! {
#[automatically_derived] #[automatically_derived]
#[cfg(feature = "server")] #[cfg(feature = "server")]
#[allow(clippy::inconsistent_struct_constructor)]
impl #ruma_api::OutgoingResponse for Response { impl #ruma_api::OutgoingResponse for Response {
fn try_into_http_response( fn try_into_http_response(
self, self,