diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-22 09:29:41 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-22 09:29:43 +0100 |
commit | 4101b0d0f188a7814bdfbf59378b0c528faa7147 (patch) | |
tree | d616d6dd73c5da9aae3ceaccd35b4cf3259b130d /src/lib.rs | |
parent | ef698909223b2f29f7a6cae17f0aba3461c8803d (diff) |
rename AssocTypeConversions to TypeConverter
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -44,7 +44,7 @@ use crate::parse_trait_sig::SignatureChanges; use crate::parse_trait_sig::TypeTransform; use crate::syn_utils::iter_path; use crate::syn_utils::trait_bounds; -use crate::transform::AssocTypeConversions; +use crate::transform::TypeConverter; mod parse_assoc_type; mod parse_trait_sig; @@ -66,7 +66,7 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { let mut objectifiable_methods: Vec<(Signature, SignatureChanges)> = Vec::new(); - let mut assoc_type_conversions = AssocTypeConversions::default(); + let mut type_converter = TypeConverter::default(); for item in &original_trait.items { if let TraitItem::Type(assoc_type) = item { @@ -82,7 +82,9 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { ) } Ok((ident, type_)) => { - assoc_type_conversions.0.insert(ident.clone(), type_); + type_converter + .assoc_type_conversions + .insert(ident.clone(), type_); } } } @@ -91,7 +93,7 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { for item in &original_trait.items { if let TraitItem::Method(method) = item { let mut signature = method.sig.clone(); - match parse_trait_signature(&mut signature, &assoc_type_conversions) { + match parse_trait_signature(&mut signature, &type_converter) { Err((_, MethodParseError::NonDispatchableMethod)) => continue, Err((span, MethodParseError::UnconvertibleAssocType)) => { return abort!( |