From e96199db6df43ce3a27536fd36cb0a96e452b4a4 Mon Sep 17 00:00:00 2001 From: Sylvain Vieujot Date: Sun, 15 Dec 2024 17:32:33 +0400 Subject: [PATCH] Let the classes! macro handle potential trailing comma. --- stylance/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stylance/src/lib.rs b/stylance/src/lib.rs index d1e3b20..e4b1814 100644 --- a/stylance/src/lib.rs +++ b/stylance/src/lib.rs @@ -347,4 +347,8 @@ macro_rules! classes { ($($exp:expr),+) => { ::stylance::JoinClasses::join_classes([$($exp.into()),*].as_slice()) }; + // Same, handling case with a trailing comma + ($($exp:expr),+,) => { + ::stylance::JoinClasses::join_classes([$($exp.into()),*].as_slice()) + }; }