Implement serde and equality traits for SecondaryMap

This commit is contained in:
Artur Jamro
2019-08-22 10:11:41 -07:00
committed by Dan Gohman
parent e736367b8c
commit d3815a0399
5 changed files with 112 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ use std::vec::Vec;
/// that it only allows indexing with the distinct `EntityRef` key type, so converting to a
/// plain slice would make it easier to use incorrectly. To make a slice of a `PrimaryMap`, use
/// `into_boxed_slice`.
#[derive(Debug, Clone, Hash)]
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct PrimaryMap<K, V>
where