summaryrefslogtreecommitdiff
path: root/templates/_specific_renderer_matching.rs.template
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_specific_renderer_matching.rs.template')
-rw-r--r--templates/_specific_renderer_matching.rs.template16
1 files changed, 7 insertions, 9 deletions
diff --git a/templates/_specific_renderer_matching.rs.template b/templates/_specific_renderer_matching.rs.template
index 9b3765f..4f1c7d2 100644
--- a/templates/_specific_renderer_matching.rs.template
+++ b/templates/_specific_renderer_matching.rs.template
@@ -1,14 +1,12 @@
-match type_name_str {
+// Auto generated by build.rs
+match type_id {
// MATCHING
// -- TEMPLATE START --
- "OutputTypeName" => {
+ type_id if type_id == std::any::TypeId::of::<OutputType>() => {
RendererType::render(
- &data
- .downcast::<OutputType>()
- .unwrap(),
- )
- .await
- }
+ &data.downcast::<OutputType>()
+ .unwrap()).await
+ },
// -- TEMPLATE END --
- _ => Err(CmdRenderError::RendererNotFound(type_name)),
+ _ => Err(CmdRenderError::RendererNotFound(format!("{:?}", type_id)))
}