From e36149aea10e1a3946f6bf1dd56d59fdbc8e5d3d Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Wed, 5 Aug 2020 16:00:54 -0400 Subject: [PATCH] Add tuple lifetime stripping to derive_outgoing --- ruma-api-macros/src/derive_outgoing.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruma-api-macros/src/derive_outgoing.rs b/ruma-api-macros/src/derive_outgoing.rs index 5f914372..2bb5bacd 100644 --- a/ruma-api-macros/src/derive_outgoing.rs +++ b/ruma-api-macros/src/derive_outgoing.rs @@ -227,6 +227,15 @@ fn strip_lifetimes(field_type: &mut Type) -> bool { } _ => false, }, + Type::Tuple(syn::TypeTuple { elems, .. }) => { + let mut has_lifetime = false; + for elem in elems { + if strip_lifetimes(elem) { + has_lifetime = true; + } + } + has_lifetime + } _ => false, } }