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
Make Bytes::from_static a const fn? #311
Conversation
Oops, should have run the test suite. It's not as small a change as I thought:
|
Maybe there is a way to scope out |
If we were to switch the loom support to use |
@seanmonstar that is what we are moving to in Tokio due to edge cases. We probably will want to do that here as well. |
Rebasing on master could allow you to only make this a |
ab533c6
to
336c015
Compare
Rust versions bumped to the minimum needed for const slice len.
336c015
to
35b06e5
Compare
Thanks. I've made that change and also bumped Rust versions. |
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.
LGTM 👍
I think it'd be useful to make
Bytes::from_static
a const fn so thatBytes
and types built onBytes
can be used in consts and statics. This would require a minimum Rust version of 1.39 though. (Opened a PR to discuss this instead of an issue because it's a two line change.)