-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix compatibility issues with various versions of Rust. #6
Conversation
Hmm, I think the
Seems like |
After further investigation, the breakage is indeed due to a limitation of |
I've changed the no_std test in the CI to directly build the crate on a This is the same approach used by many other crates, including If you'd rather not do this, that's fine with me, but this resolves the CI failure while still showing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'd rather not do this, that's fine with me
Also fine by me, thanks for doing it!
Can you elaborate on one thing I personally find confusing?
I'll publish new version in a couple hours, thanks for your work! |
Follow-up: your changes were released in |
Fix for #5. This allows the crate to be used in all versions of Rust, from
1.0.0
upwards, as specified by the Rust version badge. I have also added coverage for each of these versions to the CI, so that they don't accidentally break again in the future :)I had to remove the Kleene operator (
?
) fromassert_matches!
in order to not lose coverage inrustc 1.32.0
, since the operator requires edition 2018 in order to be used beforerustc 1.37.0
. I simply broke the optional arguments into separate matchers. Interestingly, this allowsassert_matches!
to be used in earlierrustc
versions. I bumped the MSRV for it back to1.26.0
, because that's as far back as it tests, but you could probably move it even further back by making the tests compatible (it builds all the way back to version1.7.0
, and the only thing holding it back is that the tests aren't compatible before1.26.0
). For now, I've left it at1.26.0
.