aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5e3653d..8fa1294 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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!(