Skip to content

Commit 0c2acb6

Browse files
fake-rickYangFong
andauthored
Update macros.md (#182)
* Update macros.md * Update macros.md --------- Co-authored-by: YangQi <[email protected]>
1 parent 894c003 commit 0c2acb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ tree),而不是像字符串预处理那样直接替换成代码,这样就
1010
// 这是一个简单的宏,名为 `say_hello`。
1111
macro_rules! say_hello {
1212
// `()` 表示此宏不接受任何参数。
13-
() => (
13+
() => {
1414
// 此宏将会展开成这个代码块里面的内容。
1515
println!("Hello!");
16-
)
16+
};
1717
}
1818
1919
fn main() {

0 commit comments

Comments
 (0)