Make new method const

This commit is contained in:
ShaharNaveh authored and Jeong, YunWon committed 2025-06-22 09:33:10 +09:00
1 parent efc6b5dbaf
commit e03f762b20
1 file changed
+2 -1
+2 -1
View File
@@ -107,6 +107,7 @@ where
O: Borrow<PyObject>,
{
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<PyObject>,
{
pub fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option<usize>) -> Self {
pub const fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option<usize>) -> Self {
Self {
vm,
obj,