From ff70307869a547b13850d1eec3f72e8ca3bca265 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 29 Jun 2026 03:31:44 +0800 Subject: feat: add display block support and refactor tests Deprecate old macros in favor of new deprecated module, replace the external file-based test with inline unit tests, and introduce the `??? >>>` / `??? <<<` display block syntax for conditional content inclusion per arm or globally. --- src/template.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/template.rs') diff --git a/src/template.rs b/src/template.rs index 27e14df..e368917 100644 --- a/src/template.rs +++ b/src/template.rs @@ -15,9 +15,7 @@ impl Template { /// Add an implementation block and return a HashMap to set its parameters pub fn add_impl(&mut self, impl_name: String) -> &mut Vec> { - self.impl_params - .entry(impl_name) - .or_insert_with(|| Vec::>::new()) + self.impl_params.entry(impl_name).or_default() } } -- cgit