Skip to content

Bump Rust toolchain to 1.97 and fix new clippy lints - #437

Merged
thomasschafer merged 1 commit into
mainfrom
bump-rust-toolchain-1.97
Aug 9, 2026
Merged

Bump Rust toolchain to 1.97 and fix new clippy lints#437
thomasschafer merged 1 commit into
mainfrom
bump-rust-toolchain-1.97

Conversation

@thomasschafer

Copy link
Copy Markdown
Owner

Bumps the pinned toolchain in rust-toolchain.toml from 1.91 to 1.97 (current stable). This unblocks #431, as serial_test 4.0.1 requires rustc >= 1.93.1.

Fixes the lints new to clippy 1.97:

  • map_unwrap_or: .map(NonZero::get).unwrap_or(4) -> .map_or(4, NonZero::get)
  • unnecessary_trailing_comma in xtask/src/build_readme.rs
  • duration_suboptimal_units: from_millis(2_000) -> from_secs(2) etc. in tests
  • explicit_counter_loop in a replace.rs test helper, rewritten with .take()

Verified locally with cargo fmt --check, cargo clippy --workspace --tests -- -D warnings, cargo check, cargo xtask readme --check and cargo test --workspace.

Unblocks serial_test 4.0.1 (requires rustc >= 1.93.1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thomasschafer
thomasschafer enabled auto-merge (squash) August 9, 2026 15:13
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates the pinned Rust toolchain from 1.91 to 1.97 and applies behavior-preserving changes required by the newer Clippy release.

  • Simplifies parallelism fallback calculations with Option::map_or.
  • Rewrites a test helper’s explicit counter loop using Iterator::take.
  • Expresses test timeouts in seconds and removes unnecessary format-macro commas.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete behavioral, build, or security regressions identified.

The runtime edits are semantically equivalent lint fixes, the timeout values are unchanged, and the toolchain update has no identified conflict with repository build constraints.

Important Files Changed

Filename Overview
rust-toolchain.toml Pins Rust 1.97; no conflicting repository toolchain constraint or stale 1.91 reference was identified.
scooter-core/src/replace.rs Applies equivalent map_or and iterator-based lint fixes without changing replacement behavior.
scooter-core/src/search.rs Replaces map(...).unwrap_or(...) with the semantically equivalent map_or.
scooter-core/tests/app.rs Re-expresses the two-second event timeout without changing its value.
scooter/tests/app_runner.rs Re-expresses two three-second test timeouts without changing their values.
xtask/src/build_readme.rs Removes unnecessary trailing commas from format invocations without changing generated documentation.

Reviews (1): Last reviewed commit: "Bump Rust toolchain to 1.97 and fix new ..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 69bff7d7-f6c2-4c18-bb70-45172eeab5ef

📥 Commits

Reviewing files that changed from the base of the PR and between 0e82e2e and 7cd9ce8.

📒 Files selected for processing (6)
  • rust-toolchain.toml
  • scooter-core/src/replace.rs
  • scooter-core/src/search.rs
  • scooter-core/tests/app.rs
  • scooter/tests/app_runner.rs
  • xtask/src/build_readme.rs

Walkthrough

The PR upgrades the Rust toolchain from 1.91 to 1.97. It simplifies parallelism fallback expressions and multiline test offset calculation. It expresses test timeouts with seconds-based constructors. It removes redundant trailing commas from two format! calls. Runtime behavior remains unchanged for the duration and fallback updates.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the toolchain upgrade and Clippy lint fixes, which are the main changes.
Description check ✅ Passed The description accurately explains the toolchain upgrade, lint fixes, motivation, and verification commands.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bump-rust-toolchain-1.97

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thomasschafer
thomasschafer merged commit 8799ece into main Aug 9, 2026
8 checks passed
@thomasschafer
thomasschafer deleted the bump-rust-toolchain-1.97 branch August 9, 2026 15:21
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.

1 participant