From 18eca83b4a2edc0d40ded815511733a7dfd785d5 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Sat, 30 May 2026 14:16:49 +0300 Subject: [PATCH] Fix broken CI (rustc 1.96) (#7992) * Fix lints for clippy 1.96 * Try to fix example * Put fix in correct place --- crates/vm/src/builtins/weakref.rs | 2 +- crates/vm/src/stdlib/builtins.rs | 4 ---- .../wasm32_without_js/rustpython-without-js/src/lib.rs | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/vm/src/builtins/weakref.rs b/crates/vm/src/builtins/weakref.rs index dbf2941c2..11e216847 100644 --- a/crates/vm/src/builtins/weakref.rs +++ b/crates/vm/src/builtins/weakref.rs @@ -131,7 +131,7 @@ impl Comparable for PyWeak { ) -> PyResult { op.eq_only(|| { let other = class_or_notimplemented!(Self, other); - let both = zelf.upgrade().and_then(|s| other.upgrade().map(|o| (s, o))); + let both = zelf.upgrade().zip(other.upgrade()); match both { // CPython parity (Objects/weakref.c::weakref_richcompare): use // PyObject_RichCompare on the referents, not the bool variant, diff --git a/crates/vm/src/stdlib/builtins.rs b/crates/vm/src/stdlib/builtins.rs index 403e8c12e..cfb9562b7 100644 --- a/crates/vm/src/stdlib/builtins.rs +++ b/crates/vm/src/stdlib/builtins.rs @@ -1006,10 +1006,6 @@ mod builtins { exp: y, modulus, } = args; - #[expect( - clippy::unnecessary_option_map_or_else, - reason = "changing this won't compile" - )] let modulus = modulus .as_ref() .map_or_else(|| vm.ctx.none.as_object(), |m| m); diff --git a/example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs b/example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs index 382daebb0..4219b6987 100644 --- a/example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs +++ b/example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs @@ -1,5 +1,6 @@ use rustpython_vm::Interpreter; +#[link(wasm_import_module = "env")] unsafe extern "C" { fn kv_get(kp: i32, kl: i32, vp: i32, vl: i32) -> i32;