diff --git a/vm/src/protocol/iter.rs b/vm/src/protocol/iter.rs index 254134991..34f1b01ca 100644 --- a/vm/src/protocol/iter.rs +++ b/vm/src/protocol/iter.rs @@ -107,6 +107,7 @@ where O: Borrow, { type Target = PyObject; + #[inline(always)] fn deref(&self) -> &Self::Target { self.0.borrow() @@ -242,7 +243,7 @@ impl<'a, T, O> PyIterIter<'a, T, O> where O: Borrow, { - pub fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option) -> Self { + pub const fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option) -> Self { Self { vm, obj,