From 3aca1f34dcee4dc79b00310a8f7ab8512ffa5c9f Mon Sep 17 00:00:00 2001 From: Leon Krix Date: Mon, 16 Nov 2026 15:33:22 +0100 Subject: [PATCH] fix: follow the new clippy lints of Rust 1.100 --- crates/netscenario-core/src/captures.rs | 3 +-- crates/netscenario-py/src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/netscenario-core/src/captures.rs b/crates/netscenario-core/src/captures.rs index 621f906..dde7309 100644 --- a/crates/netscenario-core/src/captures.rs +++ b/crates/netscenario-core/src/captures.rs @@ -73,9 +73,8 @@ impl Captures { format!("the link '{id}' was not built (the {index}th)"), ) })?; - for end in 0..2 { + for (end, node_name) in link.between.iter().enumerate() { control.checkpoint()?; - let node_name = &link.between[end]; let node = provisioned .nodes .iter() diff --git a/crates/netscenario-py/src/lib.rs b/crates/netscenario-py/src/lib.rs index ceb0e67..e55e55d 100644 --- a/crates/netscenario-py/src/lib.rs +++ b/crates/netscenario-py/src/lib.rs @@ -322,8 +322,10 @@ fn runset_properties(text: &str) -> PyResult> { Ok(report::set_properties(&set)) } +// The Rust function has no underscore (a lint of Rust 1.100 refuses to use an item with one); the module is still `_native` #[pymodule] -fn _native(module: &Bound<'_, PyModule>) -> PyResult<()> { +#[pyo3(name = "_native")] +fn native(module: &Bound<'_, PyModule>) -> PyResult<()> { module.add_function(wrap_pyfunction!(version, module)?)?; module.add_function(wrap_pyfunction!(parse_scenario, module)?)?; module.add_function(wrap_pyfunction!(needs, module)?)?;