From 7d10df7177d2a831f1d3208644f5333ebbd2d4ad Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 20 Oct 2020 02:22:12 +0200 Subject: [PATCH] Support `&RawJsonValue` in Outgoing derive --- ruma-common-macros/src/outgoing.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruma-common-macros/src/outgoing.rs b/ruma-common-macros/src/outgoing.rs index b44cdc4b..0169b21c 100644 --- a/ruma-common-macros/src/outgoing.rs +++ b/ruma-common-macros/src/outgoing.rs @@ -249,7 +249,10 @@ fn strip_lifetimes(field_type: &mut Type) -> bool { if last_seg.ident == "str" { // &str -> String Some(parse_quote! { ::std::string::String }) - } else if last_seg.ident == "DeviceId" || last_seg.ident == "ServerName" { + } else if last_seg.ident == "DeviceId" + || last_seg.ident == "ServerName" + || last_seg.ident == "RawJsonValue" + { // The identifiers that need to be boxed `Box` since they are DST's. Some(parse_quote! { ::std::boxed::Box<#path> }) } else {