Skip to content

Commit 491ae79

Browse files
committed
add UpdateBranchOffset impl for ir::BranchOffset
1 parent 81d9fc5 commit 491ae79

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/wasmi/src/engine/translator/comparator.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ pub trait UpdateBranchOffset: Sized {
609609
}
610610
}
611611

612+
impl UpdateBranchOffset for ir::BranchOffset {
613+
fn update_branch_offset(&mut self, new_offset: BranchOffset) {
614+
*self = new_offset;
615+
}
616+
}
617+
612618
impl UpdateBranchOffset for ir::BranchTableTarget {
613619
fn update_branch_offset(&mut self, new_offset: BranchOffset) {
614620
self.offset = new_offset;

0 commit comments

Comments
 (0)