NFC. Make FunctionBodyPtr hold a const pointer.

This commit is contained in:
Nick Lewycky
2020-10-29 15:18:42 -07:00
parent 6ec9777d22
commit 61abc72c9d
2 changed files with 2 additions and 3 deletions

View File

@@ -61,10 +61,10 @@ pub const VERSION: &str = env!("CARGO_PKG_VERSION");
/// A safe wrapper around `VMFunctionBody`
#[derive(Clone, Copy, Debug)]
#[repr(transparent)]
pub struct FunctionBodyPtr(pub *mut [VMFunctionBody]);
pub struct FunctionBodyPtr(pub *const [VMFunctionBody]);
impl std::ops::Deref for FunctionBodyPtr {
type Target = *mut [VMFunctionBody];
type Target = *const [VMFunctionBody];
fn deref(&self) -> &Self::Target {
&self.0