Put context object behind a ref rather than mut ref
This commit puts context object, i.e., the implementor of the WASI snapshot, behind a reference `&self` rather than a mutable reference `&mut self`. As suggested by @alexcrichton, this gives the implementor the possibility to determine how it handles its interior mutability.
This commit is contained in:
@@ -50,5 +50,5 @@ builtin_type!(u8, i8, u16, i16, u32, i32, u64, i64, f32, f64, usize);
|
||||
pub trait GuestErrorType {
|
||||
type Context;
|
||||
fn success() -> Self;
|
||||
fn from_error(e: GuestError, ctx: &mut Self::Context) -> Self;
|
||||
fn from_error(e: GuestError, ctx: &Self::Context) -> Self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user