diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-23 10:16:38 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-23 10:16:38 +0800 |
| commit | f2f8f1b7d8ddc829c7a0b17dadbfde4418fecda8 (patch) | |
| tree | dc75224d623547b14c60a70340167c034629b3cb /doc/usage | |
| parent | 3c031dfece124930386f95a30e166bc8fd560448 (diff) | |
29
Diffstat (limited to 'doc/usage')
| -rw-r--r-- | doc/usage/func.rs | 2 | ||||
| -rw-r--r-- | doc/usage/func_async_expand.rs | 2 | ||||
| -rw-r--r-- | doc/usage/func_expand.rs | 2 | ||||
| -rw-r--r-- | doc/usage/invoke.rs | 1 |
4 files changed, 3 insertions, 4 deletions
diff --git a/doc/usage/func.rs b/doc/usage/func.rs index eb64eb3..f407019 100644 --- a/doc/usage/func.rs +++ b/doc/usage/func.rs @@ -1,4 +1,4 @@ #[func] pub fn greet(name: &str) -> String { - format!("Hello, {name}!") + "Hello, {name}!".to_string() } diff --git a/doc/usage/func_async_expand.rs b/doc/usage/func_async_expand.rs index 1367abd..ac52411 100644 --- a/doc/usage/func_async_expand.rs +++ b/doc/usage/func_async_expand.rs @@ -1,3 +1,3 @@ pub async fn greet(name: &str) -> String { - ::alloc::__export::must_use({ ::alloc::fmt::format(format_args!("Hello, {0}!", name)) }) + "Hello, {name}!".to_string() } diff --git a/doc/usage/func_expand.rs b/doc/usage/func_expand.rs index 2d7181f..70dee21 100644 --- a/doc/usage/func_expand.rs +++ b/doc/usage/func_expand.rs @@ -1,3 +1,3 @@ pub fn greet(name: &str) -> String { - ::alloc::__export::must_use({ ::alloc::fmt::format(format_args!("Hello, {0}!", name)) }) + "Hello, {name}!".to_string() } diff --git a/doc/usage/invoke.rs b/doc/usage/invoke.rs index 99397f7..b99ecab 100644 --- a/doc/usage/invoke.rs +++ b/doc/usage/invoke.rs @@ -1,7 +1,6 @@ async fn compute(x: i32) -> i32 { x * 2 } - async fn example() -> i32 { invoke!(compute(5)) } |
