From f3f046db0781ff1b1ea33d7e8d9b5617b7c90fd0 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 22 Aug 2023 19:45:00 +0200 Subject: [PATCH] chore: re-add and deprecate `Memory::get_slice` --- crates/interpreter/src/interpreter/memory.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/interpreter/src/interpreter/memory.rs b/crates/interpreter/src/interpreter/memory.rs index 6f2eea40a8..9982cf6096 100644 --- a/crates/interpreter/src/interpreter/memory.rs +++ b/crates/interpreter/src/interpreter/memory.rs @@ -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.