From c9f39835772167449f1b559b81bea7eff1e4d46b Mon Sep 17 00:00:00 2001 From: tmontaigu Date: Thu, 12 Jan 2023 11:19:25 +0100 Subject: [PATCH] fix(rust): serialize functions take self by ref --- compiler/lib/Bindings/Rust/src/compiler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/lib/Bindings/Rust/src/compiler.rs b/compiler/lib/Bindings/Rust/src/compiler.rs index a18d5ff79..87d7d14e7 100644 --- a/compiler/lib/Bindings/Rust/src/compiler.rs +++ b/compiler/lib/Bindings/Rust/src/compiler.rs @@ -555,7 +555,7 @@ impl LibrarySupport { impl ServerLambda {} impl ClientParameters { - pub fn serialize(self) -> Result, CompilerError> { + pub fn serialize(&self) -> Result, CompilerError> { unsafe { let serialized_ref = BufferRef::wrap(ffi::clientParametersSerialize(self._c)); if serialized_ref.is_null() { @@ -696,7 +696,7 @@ impl KeySetCache { } impl EvaluationKeys { - pub fn serialize(self) -> Result, CompilerError> { + pub fn serialize(&self) -> Result, CompilerError> { unsafe { let serialized_ref = BufferRef::wrap(ffi::evaluationKeysSerialize(self._c)); if serialized_ref.is_null() { @@ -843,7 +843,7 @@ impl LambdaArgument { } impl PublicArguments { - pub fn serialize(self) -> Result, CompilerError> { + pub fn serialize(&self) -> Result, CompilerError> { unsafe { let serialized_ref = BufferRef::wrap(ffi::publicArgumentsSerialize(self._c)); if serialized_ref.is_null() { @@ -875,7 +875,7 @@ impl PublicArguments { } impl PublicResult { - pub fn serialize(self) -> Result, CompilerError> { + pub fn serialize(&self) -> Result, CompilerError> { unsafe { let serialized_ref = BufferRef::wrap(ffi::publicResultSerialize(self._c)); if serialized_ref.is_null() {