fix:修正一处代码错误。

This commit is contained in:
徐涛 2022-03-18 16:04:30 +08:00
parent 364690d187
commit 5329767b0e

View File

@ -234,7 +234,8 @@ mod client;
```rust ```rust
macro_rules! calculate { macro_rules! calculate {
(eval $e:expr store to $a:ident) => {{ // 注意expr类型描述后面可以接的内容限制
(eval $e:expr, store to $a:ident) => {{
let $a = $e; let $a = $e;
}} }}
} }
@ -246,7 +247,7 @@ macro_rules! calculate {
fn main() { fn main() {
let variable: usize = 0; let variable: usize = 0;
calculate! { calculate! {
eval (100 + 50) / (29 * 16) store to variable eval (100 + 50) / (29 * 16), store to variable
} }
} }
``` ```