Skip to content

Commit a5ed6aa

Browse files
authored
Merge pull request #1113 from nkaretnikov/macros-fixes
Minor fixes for the macros chapter
2 parents 0c84f23 + 81739b4 commit a5ed6aa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/macros/dry.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mod test {
5757
}
5858
}
5959
60-
// Test `add_assign`, `mul_assign` and `sub_assign`
60+
// Test `add_assign`, `mul_assign`, and `sub_assign`.
6161
test!(add_assign, 1u32, 2u32, 3u32);
6262
test!(mul_assign, 2u32, 3u32, 6u32);
6363
test!(sub_assign, 3u32, 2u32, 1u32);

src/macros/dsl.md

+3
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ Output:
3939
This was a very simple example, but much more complex interfaces have been
4040
developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or
4141
[`clap`](https://crates.io/crates/clap).
42+
43+
Also, note the two pairs of braces in the macro. The outer ones are
44+
part of the syntax of `macro_rules!`, in addition to `()` or `[]`.

0 commit comments

Comments
 (0)