Skip to content

Commit

Permalink
Merge pull request #1559 from laddhoffman/master
Browse files Browse the repository at this point in the history
Update variadics.md
  • Loading branch information
marioidival authored Jun 26, 2022
2 parents 6026b8b + 89b2c11 commit 811f973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macros/variadics.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ We can extend our `calculate!` macro from the previous section to be variadic:
```rust,editable
macro_rules! calculate {
// The pattern for a single `eval`
(eval $e:expr) => {{
(eval $e:expr) => {
{
let val: usize = $e; // Force types to be integers
println!("{} = {}", stringify!{$e}, val);
}
}};
};
// Decompose multiple `eval`s recursively
(eval $e:expr, $(eval $es:expr),+) => {{
Expand Down

0 comments on commit 811f973

Please sign in to comment.