summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-28 13:50:34 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-28 13:50:34 +0800
commit0f1277b455c886a8b35ee3421d6ed625576deebf (patch)
treeb3ca33f4947d3c53ea5d8df6ca2d041624730ddf
parentb06f59192bb353dd374c3040f309c4c06fce0b0b (diff)
Update README examples to use tmpl! macro syntax
-rw-r--r--README.md8
-rw-r--r--README_zh_CN.md8
2 files changed, 12 insertions, 4 deletions
diff --git a/README.md b/README.md
index cada0b2..14439b4 100644
--- a/README.md
+++ b/README.md
@@ -46,8 +46,12 @@ pub async fn my_func(
Run cmds:
```rust
-insert_impl!("arms", crate_name = "my")
-insert_impl!("arms", crate_name = "you")
+tmpl!(tmpl += {
+ arms {
+ (crate_name = "my"),
+ (crate_name = "you")
+ }
+});
```
The `arms` impl_area becomes:
diff --git a/README_zh_CN.md b/README_zh_CN.md
index 9185f24..125f58a 100644
--- a/README_zh_CN.md
+++ b/README_zh_CN.md
@@ -46,8 +46,12 @@ pub async fn my_func(
执行添加实现的指令:
```rust
-insert_impl!("arms", crate_name = "my")
-insert_impl!("arms", crate_name = "you")
+tmpl!(tmpl += {
+ arms {
+ (crate_name = "my"),
+ (crate_name = "you")
+ }
+});
```
系统会为 `arms` 实现块生成两个具体实现,此时实现块内容变为: