summaryrefslogtreecommitdiff
path: root/cli/ops/idna.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-08-18 18:30:13 +0200
committerBert Belder <bertbelder@gmail.com>2020-08-19 02:01:48 +0200
commit27f4aeb92469660fdd78a89a7b2902c08a23ca4a (patch)
treee2076aaf31f0708e5037f46d3750f93b0d637417 /cli/ops/idna.rs
parentde1007fc6a2a6c2909732dcb87a5af6c1e370b09 (diff)
Make Rc/Arc wrapper around State/GlobalState visible (#7104)
Diffstat (limited to 'cli/ops/idna.rs')
-rw-r--r--cli/ops/idna.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/ops/idna.rs b/cli/ops/idna.rs
index ee78307dc..c76ceba89 100644
--- a/cli/ops/idna.rs
+++ b/cli/ops/idna.rs
@@ -8,8 +8,9 @@ use crate::state::State;
use deno_core::CoreIsolate;
use deno_core::ZeroCopyBuf;
use idna::{domain_to_ascii, domain_to_ascii_strict};
+use std::rc::Rc;
-pub fn init(i: &mut CoreIsolate, s: &State) {
+pub fn init(i: &mut CoreIsolate, s: &Rc<State>) {
i.register_op("op_domain_to_ascii", s.stateful_json_op(op_domain_to_ascii));
}
@@ -21,7 +22,7 @@ struct DomainToAscii {
}
fn op_domain_to_ascii(
- _state: &State,
+ _state: &Rc<State>,
args: Value,
_zero_copy: &mut [ZeroCopyBuf],
) -> Result<JsonOp, OpError> {