Skip to content

fix: restore 1.85 MSRV and fix MSRV CI - #812

Merged
alamb merged 2 commits into
apache:mainfrom
LDeakin:fix/restore_1.85_MSRV
Aug 17, 2026
Merged

alamb merged 2 commits into
apache:mainfrom
LDeakin:fix/restore_1.85_MSRV

Conversation

@LDeakin

@LDeakin LDeakin commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

This just avoids using let chains, which were introduced in 1.88 or something.

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@progval

progval commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

I also get this compilation error on 1.85:

error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope
   --> src/parse.rs:477:25
    |
477 |         let body = str::from_utf8(&body).unwrap();
    |                         ^^^^^^^^^ function or associated item not found in `str`
    |
help: you are looking for the module in `std`, not the primitive type
    |
477 |         let body = std::str::from_utf8(&body).unwrap();
    |                    +++++

It's in a test, so not a big deal

@alamb
alamb merged commit 8c1cd84 into apache:main Aug 17, 2026
9 checks passed
@alamb

alamb commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Thank you @LDeakin

@LDeakin
LDeakin deleted the fix/restore_1.85_MSRV branch August 17, 2026 20:34
@alamb

alamb commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

I also get this compilation error on 1.85:

error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope
   --> src/parse.rs:477:25
    |
477 |         let body = str::from_utf8(&body).unwrap();
    |                         ^^^^^^^^^ function or associated item not found in `str`
    |
help: you are looking for the module in `std`, not the primitive type
    |
477 |         let body = std::str::from_utf8(&body).unwrap();
    |                    +++++

I think the error is that the tests are not included in

cargo +1.85 check --all-features 

We need to add the --all-targets to have the tests included too. I will make a PR to do this

@alamb

alamb commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

We need to add the --all-targets to have the tests included too. I will make a PR to do this

I also made another PR to speed up this CI check:

kylebarron pushed a commit that referenced this pull request Aug 20, 2026
…CI (#837)

str::from_utf8 (as an associated function on the str primitive) was
only stabilized in Rust 1.87, but the crate's MSRV is 1.85. The MSRV
CI job did not catch this because cargo-msrv's default check command
(cargo check) does not compile test code.

Use a custom cargo-msrv check command with --all-targets so tests,
examples, and benches are also verified against the MSRV.

Reported in #812 (comment)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

The 1.85 MSRV is inaccurate with all features

4 participants