aboutsummaryrefslogtreecommitdiff
path: root/src/transform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transform.rs')
-rw-r--r--src/transform.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/transform.rs b/src/transform.rs
index 13cf519..4649037 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -19,6 +19,7 @@ pub struct TypeConverter<'a> {
pub assoc_type_conversions: HashMap<Ident, DestType<'a>>,
}
+#[derive(Debug)]
pub enum TransformError {
AssocTypeWithoutDestType,
UnsupportedType,
@@ -237,11 +238,8 @@ fn dynamize_trait_bound(
Ok(ret_type) => {
transforms.push(ret_type);
}
- Err((span, TransformError::AssocTypeWithoutDestType)) => {
- return Err((span, MethodError::AssocTypeWithoutDestType));
- }
- Err((span, TransformError::UnsupportedType)) => {
- return Err((span, MethodError::UnsupportedType));
+ Err((span, err)) => {
+ return Err((span, err.into()));
}
}
}