-
Notifications
You must be signed in to change notification settings - Fork 11
Remove lifetime from encoding trait #47
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
Remove lifetime from encoding trait #47
Conversation
|
Similar to the other PR, we'd want to apply this to the utf8 encoding trait as well, right? |
|
shall be better now, also bumped msrv badge edit: I suppose crate version should be bumped as this is a breaking change |
| [rustc_img]: https://img.shields.io/badge/rustc_1.65.0+-lightgray.svg | ||
| [rustc_lnk]: https://blog.rust-lang.org/2022/11/03/Rust-1.65.0/ |
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.
Is 1.65.0 the new minimum version that we'll need to support to do this? I was looking at bumping the minimum version, but hadn't done it yet, hence why we support a suuuuuuper old version of 1.58.1.
Reason I ask is to make sure I know what feature(s) from this new minimum version we need, and also we'll need to update both the Github action - some of the tests run with 1.58.1 - and the minimum version referenced in the Cargo.toml file.
I'm actually surprised that the code compiles and passes in Github actions because I thought we had some actions that are using rust 1.58.1 explicitly.
Anyway, two action items after scanning the contribution - thanks for doing this, btw! - are
- Update the minimum supported version in
Cargo.toml - Update the minimum test version used in
.github/workflows/ci.yml
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.
I've used cargo msrv find and it figured out that 1.65.0 is the version, which makes sense as there GATs were stabilized
Why it can pass CI on earlier versions I have no idea, unless those are nightly, where GATs could be for a while longer before
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.
@fominok I just merged a tiny PR that switches the github action being used to install the Rust toolchain. Reading the logs, seems like while it installed the minimum version it never switched to using it, hence not hitting errors.
So rebase your PR and then go in and update the minimum version from 1.58.1 to 1.65.0. This way, we can see it go from not compiling to compiling :)
While this doesn't fixes #45 this PR is an implementation of an idea of removing lifetime parameter from
Encodingtrait as not really necessary thereedit: the branch is based on #46