Skip to content

Commit b81853f

Browse files
committed
Fix: delete PyMappingProxy new function, fix new to from function
1 parent f9a17b0 commit b81853f

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

vm/src/builtins/mappingproxy.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ impl PyPayload for PyMappingProxy {
2626
}
2727
}
2828

29-
impl PyMappingProxy {
30-
pub fn new(class: PyTypeRef) -> Self {
31-
Self {
32-
mapping: MappingProxyInner::Class(class),
33-
}
34-
}
35-
}
36-
3729
impl From<PyTypeRef> for PyMappingProxy {
3830
fn from(dict: PyTypeRef) -> Self {
3931
Self {

vm/src/builtins/type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ impl PyType {
577577

578578
#[pyproperty(magic)]
579579
fn dict(zelf: PyRef<Self>) -> PyMappingProxy {
580-
PyMappingProxy::new(zelf)
580+
PyMappingProxy::from(zelf)
581581
}
582582

583583
#[pyproperty(magic, setter)]

0 commit comments

Comments
 (0)