From 97623b4e727628c6036bddb12ca36555e7e36d85 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Fri, 15 Oct 2021 05:02:13 +0900 Subject: [PATCH] Fix __hash__ not to perform unnecessary downcast --- vm/src/types/slot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/src/types/slot.rs b/vm/src/types/slot.rs index 4ce18e15d..fea9b2e09 100644 --- a/vm/src/types/slot.rs +++ b/vm/src/types/slot.rs @@ -486,8 +486,8 @@ pub trait Hashable: PyValue { #[inline] #[pymethod] - fn __hash__(zelf: PyRef, vm: &VirtualMachine) -> PyResult { - Self::hash(&zelf, vm) + fn __hash__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::slot_hash(&zelf, vm) } fn hash(zelf: &PyRef, vm: &VirtualMachine) -> PyResult;