Hash a type based on its name because the id could be empty (#1031)
This commit is contained in:
parent
7071aabba8
commit
761cec54ef
|
|
@ -51,7 +51,7 @@ pub struct TypeDescriptor {
|
||||||
|
|
||||||
impl core::hash::Hash for TypeDescriptor {
|
impl core::hash::Hash for TypeDescriptor {
|
||||||
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
|
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
|
||||||
self.id.hash(state);
|
self.name.hash(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -536,11 +536,11 @@ mod test {
|
||||||
ids,
|
ids,
|
||||||
vec![
|
vec![
|
||||||
15907139529964845467,
|
15907139529964845467,
|
||||||
17186311536944112733,
|
14192092348022507362,
|
||||||
1674503539363691855,
|
14714934190542167928,
|
||||||
10408773954839245246,
|
4518275895314664278,
|
||||||
1677533587730447846,
|
13912679582583718470,
|
||||||
6826908746727711035
|
3236993912700824422
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue