This is an automated email from the ASF dual-hosted git repository.

kylebarron pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs-object-store.git


The following commit(s) were added to refs/heads/main by this push:
     new 978fb48  Fix MSRV violation in `parse.rs` test, check `--all-targets` 
in MSRV CI (#837)
978fb48 is described below

commit 978fb48b9ea6ebe3f8f4833f656e793cde79ab15
Author: Andrew Lamb <[email protected]>
AuthorDate: Thu Aug 20 17:45:30 2026 -0400

    Fix MSRV violation in `parse.rs` test, check `--all-targets` in MSRV 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 
https://github.com/apache/arrow-rs-object-store/pull/812#issuecomment-5061268463
    
    Co-authored-by: Claude Fable 5 <[email protected]>
---
 .github/workflows/rust.yml | 4 +++-
 src/parse.rs               | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 42c8a0c..ade7150 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -57,4 +57,6 @@ jobs:
       - name: Check
         run: |
           # run `cargo msrv verify` to see problems
-          cargo msrv verify --all-features --output-format=json || exit 1
+          # use a custom check command so tests, examples, and benches are
+          # also compiled with the MSRV toolchain
+          cargo msrv verify --output-format=json -- cargo check --all-targets 
--all-features || exit 1
diff --git a/src/parse.rs b/src/parse.rs
index 218fe69..7980d5b 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -474,7 +474,7 @@ mod tests {
 
         let res = store.get(&path).await.unwrap();
         let body = res.bytes().await.unwrap();
-        let body = str::from_utf8(&body).unwrap();
+        let body = std::str::from_utf8(&body).unwrap();
         assert_eq!(body, "result");
 
         server.shutdown().await;

Reply via email to