Support &RawJsonValue in Outgoing derive

This commit is contained in:
Jonas Platte 2020-10-20 02:22:12 +02:00
parent 3853a36ff6
commit 7d10df7177
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -249,7 +249,10 @@ fn strip_lifetimes(field_type: &mut Type) -> bool {
if last_seg.ident == "str" { if last_seg.ident == "str" {
// &str -> String // &str -> String
Some(parse_quote! { ::std::string::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<T>` since they are DST's. // The identifiers that need to be boxed `Box<T>` since they are DST's.
Some(parse_quote! { ::std::boxed::Box<#path> }) Some(parse_quote! { ::std::boxed::Box<#path> })
} else { } else {