We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97623b4 commit 42912a3Copy full SHA for 42912a3
vm/src/types/slot.rs
@@ -499,8 +499,11 @@ impl<T> Hashable for T
499
where
500
T: Unhashable,
501
{
502
- fn hash(_zelf: &PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyHash> {
503
- Err(vm.new_type_error(format!("unhashable type: '{}'", _zelf.class().name())))
+ fn slot_hash(zelf: &PyObjectRef, vm: &VirtualMachine) -> PyResult<PyHash> {
+ Err(vm.new_type_error(format!("unhashable type: '{}'", zelf.class().name())))
504
+ }
505
+ fn hash(_zelf: &PyRef<Self>, _vm: &VirtualMachine) -> PyResult<PyHash> {
506
+ unreachable!("slot_hash is implemented for unhashable types");
507
}
508
509
0 commit comments