ManevilleF / hexx

Hexagonal tools lib in rust
Apache License 2.0
288 stars 23 forks source link

`hexx v0.10.1` introduces breaking change for pre-rust `v1.71.0` #116

Closed orph3usLyre closed 11 months ago

orph3usLyre commented 1 year ago

A change introduced by PR #114 will prevent hexx from compiling with rust versions prior to v1.71.0

This is because the implementation for impl<T> From <(T, T)> for [T; 2] was only stabilized in rust v1.71.0

This is the code block that causes this issue (src/hex/convert.rs):

impl From<(f32, f32)> for Hex {
    #[inline]
    fn from(v: (f32, f32)) -> Self {
        Self::round(v.into())
    }
}

Perhaps update/mention the MSRV for the crate or rollback the change for backwards compatibility?

ManevilleF commented 1 year ago

Indeed that may be a problem, I don't know what would be the best way to handle that, maybe I should use the msrv attribute in the manifest.

@alice-i-cecile You are more experienced in OSS than I am, what would be your preferred way of handling this kind of problem ?

alice-i-cecile commented 1 year ago

My preference here is to include the MSRV in our Cargo.toml.

If you want to be particularly by-the-books, you'd yank any published releases with this undocumented semver-violating change, and bump the major version when your MSRV is updated.

ManevilleF commented 11 months ago

0.10.1 yanked !