summaryrefslogtreecommitdiff
path: root/templates/_override_renderer_entry.rs.template
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-26 00:51:45 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-26 01:02:42 +0800
commite3aeb6a1c9955eee2c396230317e63becd24ec6a (patch)
tree5c70b2a73fb32ed1a717463c81a99e346d3c25e6 /templates/_override_renderer_entry.rs.template
parentae06e0b30a328508f48c108fabcccdf1d23c5643 (diff)
Replace string type identifiers with TypeId for command output matching
Diffstat (limited to 'templates/_override_renderer_entry.rs.template')
-rw-r--r--templates/_override_renderer_entry.rs.template10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/_override_renderer_entry.rs.template b/templates/_override_renderer_entry.rs.template
index 8b2130d..7912cb0 100644
--- a/templates/_override_renderer_entry.rs.template
+++ b/templates/_override_renderer_entry.rs.template
@@ -1,13 +1,13 @@
// Auto generated by build.rs
-match type_name.as_str() {
+match type_id {
// MATCHING
// -- TEMPLATE START --
- "JVOutputTypeName" => {
+ type_id if type_id == std::any::TypeId::of::<JVOutputType>() => {
let concrete_data = data
.downcast::<JVOutputType>()
.map_err(|_| CmdProcessError::DowncastFailed)?;
- include!("../render/_override_renderer_dispatcher.rs")
- }
+ include!("../render/_override_renderer_dispatcher.rs").map_err(CmdProcessError::Render)
+ },
// -- TEMPLATE END --
- _ => return Err(CmdProcessError::NoMatchingCommand),
+ _ => Err(CmdProcessError::NoMatchingCommand)
}