Skip to content

Commit 7143b93

Browse files
committed
Rename into_generic_pyobj -> into_typed_pyobj
1 parent 807c849 commit 7143b93

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vm/src/obj/objtype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ pub fn new(
526526
slots: RefCell::default(),
527527
},
528528
dict: None,
529-
typ: typ.into_generic_pyobj(),
529+
typ: typ.into_typed_pyobj(),
530530
}
531531
.into_ref();
532532

vm/src/pyobject.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ impl PyContext {
571571

572572
pub fn new_base_object(&self, class: PyClassRef, dict: Option<PyDictRef>) -> PyObjectRef {
573573
PyObject {
574-
typ: class.into_generic_pyobj(),
574+
typ: class.into_typed_pyobj(),
575575
dict: dict.map(RefCell::new),
576576
payload: objobject::PyBaseObject,
577577
}
@@ -722,7 +722,7 @@ impl<T: PyValue> PyRef<T> {
722722
self.obj.class()
723723
}
724724

725-
pub fn into_generic_pyobj(self) -> Rc<PyObject<T>> {
725+
pub fn into_typed_pyobj(self) -> Rc<PyObject<T>> {
726726
self.into_object().downcast_generic().unwrap()
727727
}
728728
}
@@ -1123,7 +1123,7 @@ where
11231123
#[allow(clippy::new_ret_no_self)]
11241124
pub fn new(payload: T, typ: PyClassRef, dict: Option<PyDictRef>) -> PyObjectRef {
11251125
PyObject {
1126-
typ: typ.into_generic_pyobj(),
1126+
typ: typ.into_typed_pyobj(),
11271127
dict: dict.map(RefCell::new),
11281128
payload,
11291129
}

0 commit comments

Comments
 (0)