Skip to content

Commit 26f817a

Browse files
authored
Fix broken CI (rustc 1.96) (RustPython#7992)
* Fix lints for clippy 1.96 * Try to fix example * Put fix in correct place
1 parent 938d421 commit 26f817a

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

crates/vm/src/builtins/weakref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl Comparable for PyWeak {
131131
) -> PyResult<PyComparisonValue> {
132132
op.eq_only(|| {
133133
let other = class_or_notimplemented!(Self, other);
134-
let both = zelf.upgrade().and_then(|s| other.upgrade().map(|o| (s, o)));
134+
let both = zelf.upgrade().zip(other.upgrade());
135135
match both {
136136
// CPython parity (Objects/weakref.c::weakref_richcompare): use
137137
// PyObject_RichCompare on the referents, not the bool variant,

crates/vm/src/stdlib/builtins.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,10 +1006,6 @@ mod builtins {
10061006
exp: y,
10071007
modulus,
10081008
} = args;
1009-
#[expect(
1010-
clippy::unnecessary_option_map_or_else,
1011-
reason = "changing this won't compile"
1012-
)]
10131009
let modulus = modulus
10141010
.as_ref()
10151011
.map_or_else(|| vm.ctx.none.as_object(), |m| m);

example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use rustpython_vm::Interpreter;
22

3+
#[link(wasm_import_module = "env")]
34
unsafe extern "C" {
45
fn kv_get(kp: i32, kl: i32, vp: i32, vl: i32) -> i32;
56

0 commit comments

Comments
 (0)