]> git.lizzy.rs Git - rust.git/commit
simplify `vec!` macro
authorWaffle <waffle.lapkin@gmail.com>
Thu, 9 Apr 2020 08:03:57 +0000 (11:03 +0300)
committerWaffle <waffle.lapkin@gmail.com>
Thu, 9 Apr 2020 08:03:57 +0000 (11:03 +0300)
commit3ae2d21c12a1fbe909f72a96b012d7092c5419e4
tree90217a9f90256a9234a30d79b22162c140fb6710
parent11f6096a9ef6ad52de2956f4d2df200de7617077
simplify `vec!` macro

Simplify `vec!` macro by replacing 2 following branches:
- `($($x:expr),*) => (...)`
- `($($x:expr,)*) => (...)`
with one:
- `($($x:expr),* $(,)?) => (...)`
src/liballoc/macros.rs