Skip to content

Commit

Permalink
ch19-06 added curly braces to macro output (#2050)
Browse files Browse the repository at this point in the history
ch19-06 added curly braces to macro output
  • Loading branch information
carols10cents committed Jan 27, 2020
2 parents 87dd684 + 444d3ea commit b4d2acf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ macro with `vec![1, 2, 3];`, the code generated that replaces this macro call
will be the following:

```rust,ignore
let mut temp_vec = Vec::new();
temp_vec.push(1);
temp_vec.push(2);
temp_vec.push(3);
temp_vec
{
let mut temp_vec = Vec::new();
temp_vec.push(1);
temp_vec.push(2);
temp_vec.push(3);
temp_vec
}
```

We’ve defined a macro that can take any number of arguments of any type and can
Expand Down

0 comments on commit b4d2acf

Please sign in to comment.