You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_6 (already cloned)
- Base commit: ee12d44c5f13d0612dde3b6b24a412f6ddd870c8
- Task ID: juspay__hyperswitch-9391
- Version: v1.117.0
TASK DESCRIPTION: Bug: [BUILD] Bump MSRV to 1.85
Superposition has dependencies on the
askamacrate, which now requires a minimum Rust version of 1.81. Our current setup is still on 1.80, so builds fail until we upgrade the toolchain.DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
This PR bumps the Minimum Supported Rust Version (MSRV) from Rust 1.80 to 1.85. Clippy Warning Fixes: 1. Replace repeat().take() with repeat_n() - More concise iterator creation 2. Replace map_or(true, ...) with is_none_or(...) - Modern idiomatic Option handling
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
Superposition has dependencies on the
askamacrate, which now requires a minimum Rust version of 1.81. Our current setup is still on 1.80. Bumping up the MSRV to 1.85 should solve this issue.How did you test it?
N/A
Checklist
- I formatted the code
cargo +nightly fmt --all - I addressed lints thrown by
cargo clippy
Assistant
I'll help you bump the MSRV from 1.80 to 1.85 in the hyperswitch repository. Let me start by creating a plan and examining the relevant files.
Assistant
Let me start by looking for the rust-toolchain.toml file which should contain the MSRV setting:
Assistant
Let me search for any files that might contain MSRV information:
Assistant
Let me check for Cargo.toml files which often contain MSRV information:
Assistant
Let me check the main Cargo.toml file first, as that's likely where the MSRV would be defined:
Assistant
Now I found the MSRV setting! It's on line 5 in the main Cargo.toml file. Let me also check if there's a rust-toolchain.toml file at the root:
Assistant
Let me check if there's a rust-toolchain file (without the .toml extension):
Assistant
Let me also check for any Dockerfiles or CI files that might define the Rust version:
Assistant
Let me check a couple more key files to understand the current setup and also look at CI workflows to see what Rust versions they're using:
Assistant
I can see that in the CI workflow (line 111), it gets the rust version from
Cargo.tomlusingyq -oy '.workspace.package.rust-version' Cargo.toml. Now let me look at the documentation to see if there are any references to the old MSRV:Assistant
Let me also check for clippy suggestions mentioned in the task description. Let me update the MSRV in the main Cargo.toml file first:
Assistant
Let me update the todo list to reflect the work I've done so far:
Assistant
Now I need to apply the clippy fixes mentioned in the task description. Let me search for the specific patterns mentioned:
repeat().take()withrepeat_n()map_or(true, ...)withis_none_or(...)
Let me first check what clippy warnings might exist by running clippy:
Assistant
Let me search for the specific patterns in the codebase:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.