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)?)?;