Allow using wgettext_fmt without comma from macros

Otherwise we'd get this error when using it from another macro

        Some(wgettext_fmt!($fmt $(, $args)*))
                               ^ missing tokens in macro arguments
This commit is contained in:
Johannes Altmanninger 2023-03-04 01:36:05 +01:00
parent 7ec27617ae
commit b92313b79d

View File

@ -27,8 +27,8 @@ pub(crate) use wgettext;
/// The result is a WString.
macro_rules! wgettext_fmt {
(
$string:expr, // format string
$($args:expr),* // list of expressions
$string:expr // format string
$(, $args:expr)* // list of expressions
$(,)? // optional trailing comma
) => {
crate::wutil::sprintf!(&crate::wutil::wgettext!($string), $($args),*)