From 27f4aeb92469660fdd78a89a7b2902c08a23ca4a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 18 Aug 2020 18:30:13 +0200 Subject: Make Rc/Arc wrapper around State/GlobalState visible (#7104) --- cli/ops/io.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli/ops/io.rs') diff --git a/cli/ops/io.rs b/cli/ops/io.rs index c35e0d4b6..4d03e0ef7 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -11,6 +11,7 @@ use futures::future::FutureExt; use futures::ready; use std::collections::HashMap; use std::pin::Pin; +use std::rc::Rc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::task::Context; use std::task::Poll; @@ -84,7 +85,7 @@ lazy_static! { }; } -pub fn init(i: &mut CoreIsolate, s: &State) { +pub fn init(i: &mut CoreIsolate, s: &Rc) { i.register_op("op_read", s.stateful_minimal_op2(op_read)); i.register_op("op_write", s.stateful_minimal_op2(op_write)); } @@ -236,7 +237,7 @@ impl DenoAsyncRead for StreamResource { pub fn op_read( isolate_state: &mut CoreIsolateState, - _state: &State, + _state: &Rc, is_sync: bool, rid: i32, zero_copy: &mut [ZeroCopyBuf], @@ -361,7 +362,7 @@ impl DenoAsyncWrite for StreamResource { pub fn op_write( isolate_state: &mut CoreIsolateState, - _state: &State, + _state: &Rc, is_sync: bool, rid: i32, zero_copy: &mut [ZeroCopyBuf], -- cgit v1.2.3