fn read_table(cursor: &mut Cursor<&[u8]>) -> BinaryLoaderResult<Table> {
    if let Ok(kind) = cursor.read_u8() {
        let table_offset = read_u32_internal(cursor)?;
        let count = read_u32_internal(cursor)?;
        Ok(Table::new(TableType::from_u8(kind)?, table_offset, count))
    } else {
        Err(VMStatus::new(StatusCode::MALFORMED).with_message("Error reading table".to_string()))
    }
}
/// Reads a table from a slice at a given offset.
/// If a table is not recognized an error is returned.
Reads a table from a slice at a given offset.
If a table is not recognized an error is returned.
Reads a table from a slice at a given offset . If a table is not recognized an error is returned .
fn read_table(cursor: &mut Cursor<&[u8]>) -> BinaryLoaderResult<Table> {
    if let Ok(kind) = cursor.read_u8() {
        let table_offset = read_u32_internal(cursor)?;
        let count = read_u32_internal(cursor)?;
        Ok(Table::new(TableType::from_u8(kind)?, table_offset, count))
    } else {
        Err(VMStatus::new(StatusCode::MALFORMED).with_message("Error reading table".to_string()))
    }
}
fn read_table ( cursor : & mut Cursor < & [ u8 ] > ) -> BinaryLoaderResult < Table > { if let Ok ( kind ) = cursor . read_u8 ( ) { let table_offset = read_u32_internal ( cursor ) ? ; let count = read_u32_internal ( cursor ) ? ; Ok ( Table :: new ( TableType :: from_u8 ( kind ) ? , table_offset , count ) ) } else { Err ( VMStatus :: new ( StatusCode :: MALFORMED ) . with_message ( " " . to_string ( ) ) ) } }
Reads a table from a slice at a given offset.
Reads a table from a slice at a given offset .
cursor
&mut Cursor<&[u8]>
cursor
&mut Cursor<&[u8]>