From e267ec6ed5002a3e300e948d2bcb883d260ac89b Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 1 Sep 2022 15:54:40 +0530 Subject: chore(serde_v8): take mutable reference in `ToV8::to_v8` (#15707) --- core/ops.rs | 2 +- core/runtime.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/ops.rs b/core/ops.rs index a96681eb5..d22a703bd 100644 --- a/core/ops.rs +++ b/core/ops.rs @@ -99,7 +99,7 @@ pub enum OpResult { impl OpResult { pub fn to_v8<'a>( - &self, + &mut self, scope: &mut v8::HandleScope<'a>, ) -> Result, serde_v8::Error> { match self { diff --git a/core/runtime.rs b/core/runtime.rs index 366e834a2..47777099c 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -1944,7 +1944,7 @@ impl JsRuntime { // and then each tuple is used to resolve or reject promises let mut args = vec![]; - for (promise_id, resp) in results.into_iter() { + for (promise_id, mut resp) in results.into_iter() { args.push(v8::Integer::new(scope, promise_id).into()); args.push(resp.to_v8(scope).unwrap()); } -- cgit v1.2.3