mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Fix __hash__ not to perform unnecessary downcast
This commit is contained in:
@@ -486,8 +486,8 @@ pub trait Hashable: PyValue {
|
||||
|
||||
#[inline]
|
||||
#[pymethod]
|
||||
fn __hash__(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyHash> {
|
||||
Self::hash(&zelf, vm)
|
||||
fn __hash__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyHash> {
|
||||
Self::slot_hash(&zelf, vm)
|
||||
}
|
||||
|
||||
fn hash(zelf: &PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyHash>;
|
||||
|
||||
Reference in New Issue
Block a user