-
Notifications
You must be signed in to change notification settings - Fork 34
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
Replace usage of unsafe with Vec::extend_from_within #14
Comments
Yep that is basically what this code needs. Good to have an issue for that here too, thanks :) Do you know how fast these things normally get stabilized? I don't follow new features that closely before they get released. |
It depends on many factors, including if anything new comes up in the next months. For example If we have nightly users who are really interested into making things like cargo geiger happier, a |
Looks like this is going to come with 1.53 rust-lang/rust#84642 |
I wrote the RFC for |
this is great! I am not familiar with how this is usually handled. Is it ok to just require all my users to have rustc with the latest version available or do I do a conditional compilation for some time and remove the unsafe code at a later time? |
Long story short, there is no clear consensus. https://crates.io/crates/rustversion is used by Some widely used libraries take the conservative approach and only use functions requiring a newer stdlib after the required version has percolated everywhere. On the other end of the spectrum, some projects explicitly require the latest compiler at all times and don't support anything else. |
Well I guess since this is the only update and I don't see any big other changes in the nearish future, just making a new release stating that this only trades support for older compiler for removing of unsafe code should be fine. People requiring older compilers can just use the older version then, it's functionally equivalent. |
Perhaps add |
Done! I think that concludes this issue :) |
When this will eventually become stable it will allow unsafe to be removed from here:
zstd-rs/src/decoding/decodebuffer.rs
Lines 117 to 144 in b093ade
I just saw the tracking issue and I immediately remembered your crate could use something like this 😃
The text was updated successfully, but these errors were encountered: