Skip to content

Commit e03f762

Browse files
ShaharNavehyouknowone
authored andcommitted
Make new method const
1 parent efc6b5d commit e03f762

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎vm/src/protocol/iter.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ where
107107
O: Borrow<PyObject>,
108108
{
109109
type Target = PyObject;
110+
110111
#[inline(always)]
111112
fn deref(&self) -> &Self::Target {
112113
self.0.borrow()
@@ -242,7 +243,7 @@ impl<'a, T, O> PyIterIter<'a, T, O>
242243
where
243244
O: Borrow<PyObject>,
244245
{
245-
pub fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option<usize>) -> Self {
246+
pub const fn new(vm: &'a VirtualMachine, obj: O, length_hint: Option<usize>) -> Self {
246247
Self {
247248
vm,
248249
obj,

0 commit comments

Comments
 (0)