Skip to content

Commit e4adaf2

Browse files
committed
Fix __hash__ not to perforn unnecessary downcast
1 parent 0d2e203 commit e4adaf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vm/src/types/slot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ pub trait Hashable: PyValue {
486486

487487
#[inline]
488488
#[pymethod]
489-
fn __hash__(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyHash> {
490-
Self::hash(&zelf, vm)
489+
fn __hash__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyHash> {
490+
Self::slot_hash(&zelf, vm)
491491
}
492492

493493
fn hash(zelf: &PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyHash>;

0 commit comments

Comments
 (0)