Skip to content

Commit 62b2871

Browse files
committed
Debug-assert tables are compatible when copying
This shouldn't ever trip but there's also no need to ignore these flags.
1 parent b2fd5de commit 62b2871

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/wasmtime/src/runtime/vm/table.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,8 +1055,9 @@ impl Table {
10551055
match ty {
10561056
TableElementType::Func => {
10571057
// `funcref` are `Copy`, so just do a mempcy
1058-
let (dst_funcrefs, _lazy_init) = dst_table.funcrefs_mut();
1059-
let (src_funcrefs, _lazy_init) = src_table.funcrefs();
1058+
let (dst_funcrefs, dst_lazy_init) = dst_table.funcrefs_mut();
1059+
let (src_funcrefs, src_lazy_init) = src_table.funcrefs();
1060+
debug_assert_eq!(dst_lazy_init, src_lazy_init);
10601061
dst_funcrefs[dst_range].copy_from_slice(&src_funcrefs[src_range]);
10611062
}
10621063
TableElementType::GcRef => {

0 commit comments

Comments
 (0)