Skip to content

Commit f3a68d4

Browse files
committed
add From<ir2::Memory> for u32 impl
1 parent cad13c0 commit f3a68d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/ir2/src/index.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ macro_rules! define_index {
6262
}
6363
for_each_index!(define_index);
6464

65+
impl From<Memory> for u32 {
66+
fn from(value: Memory) -> Self {
67+
u32::from(value.0)
68+
}
69+
}
70+
6571
impl TryFrom<u32> for Memory {
6672
type Error = Error;
6773

0 commit comments

Comments
 (0)