From f9a48dc9469e20a58b306630774e3de8a335cf88 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 9 Apr 2023 14:06:26 +0200 Subject: [PATCH] flog.rs: allow trailing commas --- fish-rust/src/flog.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish-rust/src/flog.rs b/fish-rust/src/flog.rs index 4c65458fb..561816430 100644 --- a/fish-rust/src/flog.rs +++ b/fish-rust/src/flog.rs @@ -171,7 +171,7 @@ pub fn flog_impl(s: &str) { } macro_rules! FLOG { - ($category:ident, $($elem:expr),+) => { + ($category:ident, $($elem:expr),+ $(,)*) => { if crate::flog::categories::$category.enabled.load(std::sync::atomic::Ordering::Relaxed) { #[allow(unused_imports)] use crate::flog::{FloggableDisplay, FloggableDebug}; @@ -191,7 +191,7 @@ macro_rules! FLOG { // TODO implement. macro_rules! FLOGF { - ($category:ident, $($elem:expr),+) => { + ($category:ident, $($elem:expr),+ $(,)*) => { crate::flog::FLOG!($category, $($elem),*); } }