to_owned!: allow optional comma at the end (#584)

This commit is contained in:
saicu 2022-10-09 01:23:26 +02:00 committed by GitHub
parent 62e067ef5d
commit 6476335750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ pub(crate) mod unsafe_utils {
/// }
/// ```
macro_rules! to_owned {
($($es:ident),+) => {$(
($($es:ident),+$(,)?) => {$(
#[allow(unused_mut)]
let mut $es = $es.to_owned();
)*}