tuffy / bitstream-io

Library for reading/writing un-aligned values from/to streams in big-endian and little-endian formats
Apache License 2.0
52 stars 20 forks source link

error[E0658]: exclusive range pattern syntax is experimental < 1.80 #23

Closed marc2332 closed 2 months ago

marc2332 commented 2 months ago

Hello!

I just noticed the CI of one of my projects suddenly broke due the last release of this library.

Here is a link to the CI: https://github.com/marc2332/freya/actions/runs/10475333160/job/29011744191?pr=811#step:7:308

Also as a codeblock:

     Checking bitstream-io v2.5.1
error[E0658]: exclusive range pattern syntax is experimental
   --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitstream-io-2.5.1/src/read.rs:331:13
    |
331 |             1..MAX_CHUNK => {
    |             ^^^^^^^^^^^^
    |
    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
    = help: use an inclusive range pattern, like N..=M

It seems to me like you used the new (now stabilized in 1.80) https://github.com/rust-lang/rust/issues/37854 feature. Which explains why my CI broke as I am pinned to 1.79 (I should probably update it tbh). That said, this projects says that the MSVR is 1.79, which I guess is no longer true. So, the question is

Should a new patch version be released so 1.79 remains supported, or should the project now have a MSRV of 1.80 ? I am happy to help by contributing.

tuffy commented 2 months ago

I've converted this test to a match guard and yanked the offending minor version in favor of 2.5.2, since it's just a minor thing that shouldn't necessarily require a whole new Rust version.

marc2332 commented 2 months ago

Thanks for the quick response, it now seems to run correctly :) Nice work! Closing this ✅