From 7489a3c2246e7ea2483446dd2ed3fdbfaf462c1a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 25 Nov 2021 10:30:54 +0100 Subject: introduce #[convert] attribute --- src/parse_assoc_type.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parse_assoc_type.rs') diff --git a/src/parse_assoc_type.rs b/src/parse_assoc_type.rs index adde237..e52dd14 100644 --- a/src/parse_assoc_type.rs +++ b/src/parse_assoc_type.rs @@ -30,12 +30,12 @@ impl ToTokens for BoxType { } } -pub enum DestType<'a> { - Into(&'a Type), +pub enum DestType { + Into(Type), Box(BoxType), } -impl DestType<'_> { +impl DestType { pub fn get_dest(&self) -> Type { match self { DestType::Into(ty) => (*ty).clone(), @@ -78,7 +78,7 @@ pub fn parse_assoc_type( )); } - return Ok((&assoc_type.ident, DestType::Into(into_type))); + return Ok((&assoc_type.ident, DestType::Into(into_type.clone()))); } } } -- cgit v1.2.3