fix: deprecated function
@@ -20,6 +20,7 @@ use crate::{
AsObject, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, TryFromObject, VirtualMachine,
};
use indexmap::IndexMap;
+use std::iter::zip;
use itertools::Itertools;
use std::fmt;
#[cfg(feature = "threading")]
@@ -193,7 +194,7 @@ impl FrameRef {
let j = std::cmp::min(map.len(), code.varnames.len());
if !code.varnames.is_empty() {
let fastlocals = self.fastlocals.lock();
- for (&k, v) in itertools::zip(&map[..j], &**fastlocals) {
+ for (&k, v) in zip(&map[..j], &**fastlocals) {
match locals.mapping().ass_subscript(k, v.clone(), vm) {
Ok(()) => {}
Err(e) if e.fast_isinstance(vm.ctx.exceptions.key_error) => {}
@@ -203,7 +204,7 @@ impl FrameRef {
}
if !code.cellvars.is_empty() || !code.freevars.is_empty() {
let map_to_dict = |keys: &[&PyStrInterned], values: &[PyCellRef]| {
- for (&k, v) in itertools::zip(keys, values) {
+ for (&k, v) in zip(keys, values) {
if let Some(value) = v.get() {
locals.mapping().ass_subscript(k, Some(value), vm)?;
} else {
