Implement Debug for Incoming types

This commit is contained in:
Jonas Platte 2020-02-10 10:49:47 +01:00
parent a9abdbc5e9
commit a811a709ec
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
5 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,12 @@
# [unreleased]
# 0.13.1
Improvements:
* Update ruma-api-macros to 0.10.1
* `Incoming` types will now implement `Debug`
# 0.13.0
Breaking changes:

View File

@ -12,13 +12,13 @@ license = "MIT"
name = "ruma-api"
readme = "README.md"
repository = "https://github.com/ruma/ruma-api"
version = "0.13.0"
version = "0.13.1"
edition = "2018"
[dependencies]
http = "0.2.0"
percent-encoding = { version = "2.1.0", optional = true }
ruma-api-macros = { version = "=0.10.0", path = "ruma-api-macros", optional = true }
ruma-api-macros = { version = "=0.10.1", path = "ruma-api-macros", optional = true }
ruma-identifiers = { version = "0.14.1", optional = true }
serde = { version = "1.0.104", features = ["derive"], optional = true }
serde_json = "1.0.47"

View File

@ -1,5 +1,11 @@
# [unreleased]
# 0.10.1
Improvements:
* Derive `Debug` for `Incoming` types
# 0.10.0
Breaking changes:

View File

@ -12,7 +12,7 @@ license = "MIT"
name = "ruma-api-macros"
readme = "README.md"
repository = "https://github.com/ruma/ruma-api"
version = "0.10.0"
version = "0.10.1"
edition = "2018"
[dependencies]

View File

@ -27,7 +27,7 @@ pub fn expand_derive_outgoing(input: DeriveInput) -> syn::Result<TokenStream> {
let derive_deserialize = if no_deserialize_in_attrs(&input.attrs) {
TokenStream::new()
} else {
quote!(#[derive(ruma_api::exports::serde::Deserialize)])
quote!(ruma_api::exports::serde::Deserialize)
};
let (mut fields, struct_kind): (Vec<_>, _) = match input.data {
@ -92,7 +92,7 @@ pub fn expand_derive_outgoing(input: DeriveInput) -> syn::Result<TokenStream> {
Ok(quote! {
#[doc = #doc]
#derive_deserialize
#[derive(Debug, #derive_deserialize)]
#vis struct #incoming_ident #struct_def
impl ruma_api::Outgoing for #original_ident {