diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs index 05f1acb8d..b930c7809 100644 --- a/rust/src/custombinaryview.rs +++ b/rust/src/custombinaryview.rs @@ -329,7 +329,7 @@ pub unsafe trait CustomBinaryView: 'static + BinaryViewBase + Sync + Sized { type Args: Send; fn new(handle: &BinaryView, args: &Self::Args) -> Result; - fn init(&self, args: Self::Args) -> Result<()>; + fn init(&mut self, args: Self::Args) -> Result<()>; } /// Represents a partially initialized custom `BinaryView` that should be returned to the core @@ -432,7 +432,7 @@ impl<'a, T: CustomBinaryViewType> CustomViewBuilder<'a, T> { match context .view - .assume_init_ref() + .assume_init_mut() .init(ptr::read(&context.args)) { Ok(_) => true,