Add an as_u32() member to entity_impl types.

This allows us to avoid a lot of casting indices back to u32.
This commit is contained in:
Dan Gohman
2018-11-30 16:16:35 -08:00
parent 954573440d
commit 91477d21c8
6 changed files with 16 additions and 9 deletions

View File

@@ -266,7 +266,7 @@ impl UFEntry {
/// Encode a link entry.
fn encode_link(v: Value) -> i32 {
!(v.index() as i32)
!(v.as_u32() as i32)
}
}