Skip to content

Commit

Permalink
Merge pull request #1113 from nkaretnikov/macros-fixes
Browse files Browse the repository at this point in the history
Minor fixes for the macros chapter
  • Loading branch information
frewsxcv authored Jan 19, 2019
2 parents 0c84f23 + 81739b4 commit a5ed6aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/macros/dry.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mod test {
}
}
// Test `add_assign`, `mul_assign` and `sub_assign`
// Test `add_assign`, `mul_assign`, and `sub_assign`.
test!(add_assign, 1u32, 2u32, 3u32);
test!(mul_assign, 2u32, 3u32, 6u32);
test!(sub_assign, 3u32, 2u32, 1u32);
Expand Down
3 changes: 3 additions & 0 deletions src/macros/dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ Output:
This was a very simple example, but much more complex interfaces have been
developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or
[`clap`](https://crates.io/crates/clap).

Also, note the two pairs of braces in the macro. The outer ones are
part of the syntax of `macro_rules!`, in addition to `()` or `[]`.

0 comments on commit a5ed6aa

Please sign in to comment.