mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Wasm: Make dead functions unreachable
, and the same for all return types
This commit is contained in:
parent
e7dc442af0
commit
4311b5a410
4 changed files with 27 additions and 135 deletions
|
@ -250,10 +250,6 @@ pub fn decode_u32(bytes: &[u8]) -> Result<(u32, usize), String> {
|
|||
))
|
||||
}
|
||||
|
||||
pub fn decode_u32_or_panic(bytes: &[u8]) -> (u32, usize) {
|
||||
decode_u32(bytes).unwrap_or_else(|e| internal_error!("{}", e))
|
||||
}
|
||||
|
||||
pub fn parse_u32_or_panic(bytes: &[u8], cursor: &mut usize) -> u32 {
|
||||
let (value, len) = decode_u32(&bytes[*cursor..]).unwrap_or_else(|e| internal_error!("{}", e));
|
||||
*cursor += len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue