Skip to content

Commit

Permalink
chore: re-add and deprecate Memory::get_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Aug 24, 2023
1 parent 00c21bb commit f3f046d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/interpreter/src/interpreter/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ impl Memory {
}
}

#[deprecated = "use `slice` instead"]
#[inline(always)]
#[cfg_attr(debug_assertions, track_caller)]
pub fn get_slice(&self, offset: usize, size: usize) -> &[u8] {
self.slice(offset, size)
}

/// Returns a mutable byte slice of the memory region at the given offset.
///
/// Panics on out of bounds.
Expand Down

0 comments on commit f3f046d

Please sign in to comment.