Use u64 instead of usize in ElementId (#29493)
Truncation to a 32 bit `usize` could cause two distinct IDs to be considered the same element. Release Notes: - N/A
This commit is contained in:
@@ -65,7 +65,7 @@ pub struct CustomBlockId(pub usize);
|
||||
|
||||
impl From<CustomBlockId> for ElementId {
|
||||
fn from(val: CustomBlockId) -> Self {
|
||||
ElementId::Integer(val.0)
|
||||
val.0.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1065,7 +1065,7 @@ pub struct FoldId(usize);
|
||||
|
||||
impl From<FoldId> for ElementId {
|
||||
fn from(val: FoldId) -> Self {
|
||||
ElementId::Integer(val.0)
|
||||
val.0.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user