fix(rust): revert is_multiple_of to maintain MSRV 1.54.0 #1768
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
The build was failing with Rust 1.54.0 due to use of
is_multiple_of()method, which wasn't stable until Rust 1.90.0. This broke the project's stated Minimum Supported Rust Version (MSRV) of 1.54.0.Root Cause:
The
is_multiple_of()method was introduced in #1753 to satisfy Clippy lints, but Clippy wasn't configured with the project's MSRV, causing it to suggest APIs unavailable in Rust 1.54.0.Solution:
is_multiple_of(2)back to stable% 2 == 0checkclippy.tomlwithmsrv = "1.54.0"to prevent Clippy from suggesting incompatible APIs in the futureChanges Made
src/rust/src/es/pic.rs: Revertedis_multiple_of(2)→% 2 == 0src/rust/clippy.toml: Added MSRV configurationVerification
is_multiple_of(2)≡% 2 == 0)This fix maintains compatibility with the project's stated MSRV while preventing similar issues in the future.
Closes #1765