Recently, the read_exact method was added to the Read trait. See https://github.com/rust-lang/rust/issues/27585 and its implementation in https://github.com/rust-lang/rust/pull/27588.
This introduction breaks my zip crate (mvdnes/zip-rs), as that one uses the read_exact method from my podio crate.
The signatures do not match:
// std::...::Read
fn read_exact(&mut self, mut buf: &mut [u8]) -> Result<()>;`
// podio::ReadPodExt
fn read_exact(&mut self, usize) -> io::Result<Vec<u8>>;
To fix this, I have to introduce a patch as in here, but this means that it would only compile on nightly and no longer on stable.
I was wondering whether this issue is solely my problem, or a larger problem in general. This has some strong issues for stability.
I am aware of the API evolution RFC, but was not able to pinpoint the exact case that this falls into.
Also, what is the best course of action to get it to work both on nightly and on stable. Renaming the method is a breaking change to my own API. This is fine for my simple never-used crate, but what about the larger picture. Another solution is to use UFCS in zip-rs, but that is not something I would like to do possibly on every Rust release.