technocreatives / core2

The bare essentials of std::io for use in no_std. Alloc support is optional.
https://docs.rs/core2
Apache License 2.0
71 stars 23 forks source link

Use stable features where possible #17

Closed vmx closed 2 years ago

vmx commented 2 years ago

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.

Stebalien commented 2 years ago

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.

vmx commented 2 years ago

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

Hence I'm closing this issue.