diff --git a/vm/src/stdlib/collections.rs b/vm/src/stdlib/collections.rs index 373bef6a6..3a814fdb7 100644 --- a/vm/src/stdlib/collections.rs +++ b/vm/src/stdlib/collections.rs @@ -5,7 +5,7 @@ mod _collections { use crate::builtins::pytype::PyTypeRef; use crate::common::lock::{PyRwLock, PyRwLockReadGuard, PyRwLockWriteGuard}; use crate::function::OptionalArg; - use crate::slots::{Comparable, Iterable, PyComparisonOp, PyIter}; + use crate::slots::{Comparable, Hashable, Iterable, PyComparisonOp, PyIter, Unhashable}; use crate::vm::ReprGuard; use crate::VirtualMachine; use crate::{sequence, sliceable}; @@ -64,7 +64,7 @@ mod _collections { } } - #[pyimpl(flags(BASETYPE), with(Comparable, Iterable))] + #[pyimpl(flags(BASETYPE), with(Comparable, Hashable, Iterable))] impl PyDeque { #[pyslot] fn tp_new( @@ -340,6 +340,8 @@ mod _collections { } } + impl Unhashable for PyDeque {} + impl Iterable for PyDeque { fn iter(zelf: PyRef, vm: &VirtualMachine) -> PyResult { Ok(PyDequeIterator {