From a0aa9e4616c6e37fbe4734fdc175fa9ae54eda00 Mon Sep 17 00:00:00 2001 From: dhanush varma Date: Fri, 21 Nov 2025 22:39:26 +0530 Subject: [PATCH 1/2] fix(rust): revert is_multiple_of to maintain MSRV 1.54.0 - Reverts is_multiple_of(2) to stable % 2 == 0 check to maintain compatibility with Rust 1.54.0 (project MSRV) - Adds clippy.toml with msrv = '1.54.0' to prevent Clippy from suggesting APIs that aren't available in the MSRV Fixes: #1765 --- src/rust/clippy.toml | 1 + src/rust/src/es/pic.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/rust/clippy.toml diff --git a/src/rust/clippy.toml b/src/rust/clippy.toml new file mode 100644 index 000000000..0f31b88d4 --- /dev/null +++ b/src/rust/clippy.toml @@ -0,0 +1 @@ +msrv = "1.54.0" diff --git a/src/rust/src/es/pic.rs b/src/rust/src/es/pic.rs index 6ff08e493..c86df4076 100644 --- a/src/rust/src/es/pic.rs +++ b/src/rust/src/es/pic.rs @@ -250,7 +250,7 @@ pub unsafe fn read_pic_info( dec_ctx.pulldownfields += 1; dec_ctx.total_pulldownfields += 1; if dec_ctx.current_progressive_sequence != 0 - || dec_ctx.total_pulldownfields.is_multiple_of(2) + || dec_ctx.total_pulldownfields % 2 == 0 { extraframe = 1; } From c9d80e12b8e1732809b026a144afa39525ef5fa2 Mon Sep 17 00:00:00 2001 From: dhanush varma Date: Sun, 23 Nov 2025 00:10:04 +0530 Subject: [PATCH 2/2] bump: update MSRV from 1.54.0 to 1.87.0 - Update all build configuration files to require Rust 1.87.0+ - Add clippy.toml with MSRV configuration as requested - Maintain modern Rust features like is_multiple_of() - Fixes build compatibility issue #1765 --- linux/build | 2 +- linux/configure.ac | 2 +- mac/build.command | 4 ++-- mac/configure.ac | 2 +- src/rust/CMakeLists.txt | 2 +- src/rust/clippy.toml | 2 +- src/rust/src/es/pic.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linux/build b/linux/build index 51fb7932f..2a6d366b6 100755 --- a/linux/build +++ b/linux/build @@ -101,7 +101,7 @@ fi rustc_version="$(rustc --version)" semver=( ${rustc_version//./ } ) version="${semver[1]}.${semver[2]}.${semver[3]}" -MSRV="1.54.0" +MSRV="1.87.0" if [ "$(printf '%s\n' "$MSRV" "$version" | sort -V | head -n1)" = "$MSRV" ]; then echo "rustc >= MSRV(${MSRV})" else diff --git a/linux/configure.ac b/linux/configure.ac index dc80ffdee..29007d283 100644 --- a/linux/configure.ac +++ b/linux/configure.ac @@ -104,7 +104,7 @@ if test "x$with_rust" = "xyes" ; then AS_IF([test "$RUSTC" = "notfound"], [AC_MSG_ERROR([rustc is required])]) rustc_version=$(rustc --version) - MSRV="1.54.0" + MSRV="1.87.0" AX_COMPARE_VERSION($rustc_version, [ge], [$MSRV], [AC_MSG_RESULT(rustc >= $MSRV)], [AC_MSG_ERROR([Minimum supported rust version(MSRV) is $MSRV, please upgrade rust])]) diff --git a/mac/build.command b/mac/build.command index e0aab469a..5fdedd575 100755 --- a/mac/build.command +++ b/mac/build.command @@ -215,7 +215,7 @@ fi rustc_version="$(rustc --version)" semver=( ${rustc_version//./ } ) version="${semver[1]}.${semver[2]}.${semver[3]}" -MSRV="1.54.0" +MSRV="1.87.0" if [ "$(printf '%s\n' "$MSRV" "$version" | sort -V | head -n1)" = "$MSRV" ]; then echo "rustc >= MSRV(${MSRV})" else @@ -268,4 +268,4 @@ if [[ "$out" != "" ]]; then echo "Compilation successful, compiler message shown in previous lines" else echo "Compilation successful, no compiler messages." -fi \ No newline at end of file +fi diff --git a/mac/configure.ac b/mac/configure.ac index 975fa5faf..a5a527392 100644 --- a/mac/configure.ac +++ b/mac/configure.ac @@ -104,7 +104,7 @@ if test "x$with_rust" = "xyes" ; then AS_IF([test "$RUSTC" = "notfound"], [AC_MSG_ERROR([rustc is required])]) rustc_version=$(rustc --version) - MSRV="1.54.0" + MSRV="1.87.0" AX_COMPARE_VERSION($rustc_version, [ge], [$MSRV], [AC_MSG_RESULT(rustc >= $MSRV)], [AC_MSG_ERROR([Minimum supported rust version(MSRV) is $MSRV, please upgrade rust])]) diff --git a/src/rust/CMakeLists.txt b/src/rust/CMakeLists.txt index 680d081ca..34dc6e782 100644 --- a/src/rust/CMakeLists.txt +++ b/src/rust/CMakeLists.txt @@ -20,7 +20,7 @@ else() endif() # Check rust version -set(MSRV "1.54.0") +set(MSRV "1.87.0") if(Rust_VERSION VERSION_GREATER_EQUAL ${MSRV}) message(STATUS "rustc >= MSRV(${MSRV})") else() diff --git a/src/rust/clippy.toml b/src/rust/clippy.toml index 0f31b88d4..83bf2baa7 100644 --- a/src/rust/clippy.toml +++ b/src/rust/clippy.toml @@ -1 +1 @@ -msrv = "1.54.0" +msrv = "1.87.0" diff --git a/src/rust/src/es/pic.rs b/src/rust/src/es/pic.rs index c86df4076..6ff08e493 100644 --- a/src/rust/src/es/pic.rs +++ b/src/rust/src/es/pic.rs @@ -250,7 +250,7 @@ pub unsafe fn read_pic_info( dec_ctx.pulldownfields += 1; dec_ctx.total_pulldownfields += 1; if dec_ctx.current_progressive_sequence != 0 - || dec_ctx.total_pulldownfields % 2 == 0 + || dec_ctx.total_pulldownfields.is_multiple_of(2) { extraframe = 1; }