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

Use stable features where possible #17

Closed
wants to merge 2 commits into from

Conversation

vmx
Copy link

@vmx vmx commented Jan 28, 2022

io::copy() as well as the BufReader/BufWriter don't need nightly
Rust anymore as they the features needed are available on more recent
stable Rust versions. This commit bumps the MSRV to 1.55.

Closes #15.

`io::copy()` as well as the `BufReader`/`BufWriter` don't need nightly
Rust anymore as they the features needed are available on more recent
stable Rust versions. This commit bumps the MSRV to 1.55.

Closes technocreatives#15.
@Stebalien
Copy link

Rust anymore as they the features needed are available on more recent
stable Rust versions

I don't think this is correct. The current code reveals uninitialized memory which is generally UB. The new method (still unstable) is to use https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf.

For now, I'd suggest just initializing a buffer unless nightly is available.

The doc tests currently don't compile, this is not a regression, it has
been the case even before the previous commit.
@vmx
Copy link
Author

vmx commented Jan 31, 2022

I wanted to many thing at the same time with this PR. This should be split into separate ones:

  • Using a newer Rust version (MSRV) and check which features can now be implemented without requiring nightly
  • Upgrading nightly APIs to the latest nightly version
  • Implement io::copy() for stable Rust

Hence I'm closing this issue.

@vmx vmx closed this Jan 31, 2022
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

Successfully merging this pull request may close these issues.

Remove feature nightly?
2 participants