Repository: projectfluent/fluent-rs (rust)

Issue:
[DX Enhancement] Make fluent_args works with trailing comma
Currently, this code won't compile:
```rust
fluent_args! {
  "name" => "World",
}
```
Because fluent_args! doesn't handle trailing commas. The fix would be trivial, so I could do a PR if this is appreciated.

Pull request:
Make fluent_args macro work with trailing comma
Fixes #266 

Patch:
diff --git a/fluent/src/lib.rs b/fluent/src/lib.rs
index caa28db..1cbefc0 100644
--- a/fluent/src/lib.rs
+++ b/fluent/src/lib.rs
@@ -86,13 +86,13 @@ pub use fluent_bundle::*;
 ///
 /// let mut args = fluent_args![
 ///     "name" => "John",
-///     "emailCount" => 5
+///     "emailCount" => 5,
 /// ];
 ///
 /// ```
 #[macro_export]
 macro_rules! fluent_args {
-    ( $($key:expr => $value:expr),* ) => {
+    ( $($key:expr => $value:expr),* $(,)? ) => {
         {
             let mut args: $crate::FluentArgs = $crate::FluentArgs::new();
             $(


Test patch:
diff --git a/fluent/tests/macro.rs b/fluent/tests/macro.rs
index d362bc8..bff6d6a 100644
--- a/fluent/tests/macro.rs
+++ b/fluent/tests/macro.rs
@@ -7,7 +7,7 @@ fn test_fluent_args() {
     let args = fluent_args![
         "name" => "John",
         "emailCount" => 5,
-        "customValue" => FluentValue::from("My Value")
+        "customValue" => FluentValue::from("My Value"),
     ];
     assert_eq!(
         args.get("name"),