10 ms·
Maps can be compared lexicographically. BTreeMap and VecMap have a canonical order in which they store their elements so iter::order::cmp(self.iter(), other.
by dbaupp 11y ago
Maps can be compared lexicographically. BTreeMap and VecMap have a canonical order in which they store their elements so
iter::order::cmp(self.iter(), other.iter())
works as an ordering.
HashMap in Rust (dict in Python) doesn't have a canonical ordering of elements, so this doesn't make sense.