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

Bug in assert_matches deprecation message #327

Closed
smoelius opened this issue May 21, 2024 · 3 comments
Closed

Bug in assert_matches deprecation message #327

smoelius opened this issue May 21, 2024 · 3 comments

Comments

@smoelius
Copy link
Contributor

Currently, it says:

#[deprecated(since = "0.5.11", note = "Replaced with `assert_data_eq!(actual)`")]

I think it should say something like the following?

Replaced with `assert_data_eq!(expected, actual)`
                               ^^^^^^^^^^
@epage epage closed this as completed in cf41201 May 21, 2024
@smoelius
Copy link
Contributor Author

I know it's a little bikesheddy, but can I ask why you went with the actual, expected order?

@epage
Copy link
Contributor

epage commented May 21, 2024

I personally prefer (actual, expected) asserts (and if conditions) but our output is of the model diff expected actual which suggests (expected, actual), so I think that is why (expected, actual) was used. This came up again in #226 and that was enough to push me over the edge to switch them but I still go back and forth.

@smoelius
Copy link
Contributor Author

Thank you vey much for your reply.

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

No branches or pull requests

2 participants