aboutsummaryrefslogtreecommitdiff
path: root/macros/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src/libs')
-rw-r--r--macros/src/libs/intertrait_macros/gen_caster.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/macros/src/libs/intertrait_macros/gen_caster.rs b/macros/src/libs/intertrait_macros/gen_caster.rs
index a703a62..a76bb52 100644
--- a/macros/src/libs/intertrait_macros/gen_caster.rs
+++ b/macros/src/libs/intertrait_macros/gen_caster.rs
@@ -32,46 +32,46 @@ pub fn generate_caster(
let new_caster = if sync {
quote! {
- syrette::libs::intertrait::Caster::<dyn #dst_trait>::new_sync(
+ syrette::libs::intertrait::Caster::<#dst_trait>::new_sync(
|from| {
let concrete = from
.downcast::<#ty>()
.map_err(|_| syrette::libs::intertrait::CasterError::CastBoxFailed)?;
- Ok(concrete as Box<dyn #dst_trait>)
+ Ok(concrete as Box<#dst_trait>)
},
|from| {
let concrete = from
.downcast::<#ty>()
.map_err(|_| syrette::libs::intertrait::CasterError::CastRcFailed)?;
- Ok(concrete as std::rc::Rc<dyn #dst_trait>)
+ Ok(concrete as std::rc::Rc<#dst_trait>)
},
|from| {
let concrete = from
.downcast::<#ty>()
.map_err(|_| syrette::libs::intertrait::CasterError::CastArcFailed)?;
- Ok(concrete as std::sync::Arc<dyn #dst_trait>)
+ Ok(concrete as std::sync::Arc<#dst_trait>)
},
)
}
} else {
quote! {
- syrette::libs::intertrait::Caster::<dyn #dst_trait>::new(
+ syrette::libs::intertrait::Caster::<#dst_trait>::new(
|from| {
let concrete = from
.downcast::<#ty>()
.map_err(|_| syrette::libs::intertrait::CasterError::CastBoxFailed)?;
- Ok(concrete as Box<dyn #dst_trait>)
+ Ok(concrete as Box<#dst_trait>)
},
|from| {
let concrete = from
.downcast::<#ty>()
.map_err(|_| syrette::libs::intertrait::CasterError::CastRcFailed)?;
- Ok(concrete as std::rc::Rc<dyn #dst_trait>)
+ Ok(concrete as std::rc::Rc<#dst_trait>)
},
)
}