Skip to content

Commit

Permalink
refactor: remove unreachable code in Memory setmethod (#288)
Browse files Browse the repository at this point in the history
remove unreachable code in Memory set
  • Loading branch information
tcoratger authored Dec 22, 2023
1 parent e53ef2d commit 9cf73c8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/vm/memory/memory.zig
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,6 @@ pub const Memory = struct {
return MemoryError.UnallocatedSegment;
}

if (data.items.len <= @as(usize, segment_index)) {
try data.appendNTimes(
std.ArrayListUnmanaged(?MemoryCell){},
@as(usize, segment_index) + 1 - data.items.len,
);
}

var data_segment = &data.items[segment_index];

if (data_segment.items.len <= @as(usize, @intCast(address.offset))) {
Expand Down

0 comments on commit 9cf73c8

Please sign in to comment.