diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-11 16:52:15 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-11 16:52:15 +0800 |
| commit | 32d9c4adbf58b810f73f4116bb328caae4e0743b (patch) | |
| tree | e40115a55655e0f300dc769708c34efcfc2adf41 | |
| parent | 57fb6c2ebb53f9977945528940d412561cc033db (diff) | |
docs: Update help functions note to use `writeln!` instead of
`r_println!`
| -rw-r--r-- | docs/_zh_CN/pages/10-help.md | 2 | ||||
| -rw-r--r-- | docs/pages/10-help.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/_zh_CN/pages/10-help.md b/docs/_zh_CN/pages/10-help.md index db67a84..8cee2aa 100644 --- a/docs/_zh_CN/pages/10-help.md +++ b/docs/_zh_CN/pages/10-help.md @@ -24,7 +24,7 @@ fn help_greet(_entry: EntryGreet) -> RenderResult { ``` > [!NOTE] -> 帮助函数里也用 `r_println!`,因为 `#[help]` 走的也是渲染流程 —— 它是被 `--help` 参数提前触发的短路渲染,不是独立于管线之外的逻辑。 +> 帮助函数同样通过 `writeln!` 向 `RenderResult` 写入内容,因为 `#[help]` 遵循渲染管线 —— 它是由 `--help` 标志提前触发的短路渲染,而不是管线之外的逻辑。 ## 全局帮助 diff --git a/docs/pages/10-help.md b/docs/pages/10-help.md index 7ef1f26..c17f410 100644 --- a/docs/pages/10-help.md +++ b/docs/pages/10-help.md @@ -24,7 +24,7 @@ fn help_greet(entry: EntryGreet) -> RenderResult { ``` > [!NOTE] -> Help functions also use `r_println!`, because `#[help]` follows the rendering pipeline — it's a short-circuit render triggered early by the `--help` flag, not logic outside the pipeline. +> Help functions also use `writeln!` into a `RenderResult`, because `#[help]` follows the rendering pipeline — it's a short-circuit render triggered early by the `--help` flag, not logic outside the pipeline. ## Global Help |
