Skip to content

Commit

Permalink
Merge pull request #9 from svieujot/main
Browse files Browse the repository at this point in the history
Let the classes! macro handle potential trailing comma.
  • Loading branch information
basro authored Dec 15, 2024
2 parents 3ad6e27 + e96199d commit 33be2b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stylance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
};
}

0 comments on commit 33be2b3

Please sign in to comment.