Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for trailing commas on assert_that! and expect_that!. #341

Merged
1 commit merged into from
Dec 18, 2023

Conversation

hovinen
Copy link
Collaborator

@hovinen hovinen commented Dec 16, 2023

Previously, putting a trailing comma on assert_that! or expect_that! would produce a compilation error when no custom error message is present:

assert_that!(
   value,
   eq(2),  // Error!
);

This change adds support for trailing commas, making the behaviour of these macros more consistent with the rest of the library and Rust idioms.

Fixes #340

Previously, putting a trailing comma on `assert_that!` or `expect_that!` would produce a compilation error when no custom error message is present:

```
assert_that!(
   value,
   eq(2),  // Error!
);
```

This change adds support for trailing commas, making the behaviour of these macros more consistent with the rest of the library and Rust idioms.

Fixes #340
@copybara-service copybara-service bot closed this pull request by merging all changes into main in 41127ca Dec 18, 2023
@gribozavr gribozavr deleted the support-trailing-comma-in-top-level-macros branch February 17, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert_that! and kin should allow a trailing comma
1 participant