summaryrefslogtreecommitdiff
path: root/cli/ops/runtime_compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-26 20:26:51 +0200
committerGitHub <noreply@github.com>2020-09-26 20:26:51 +0200
commite1beebc71a53d5ad9203a71f8f2764efaac2f649 (patch)
tree52777321e31fc13d6aeb6dd96f6a0aa88d68d109 /cli/ops/runtime_compiler.rs
parentf64a44810e1fc732cd5a0aecec541c6c8a289806 (diff)
refactor: factor out check_unstable op helper (#7695)
Diffstat (limited to 'cli/ops/runtime_compiler.rs')
-rw-r--r--cli/ops/runtime_compiler.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs
index 91e638033..b06e51157 100644
--- a/cli/ops/runtime_compiler.rs
+++ b/cli/ops/runtime_compiler.rs
@@ -34,9 +34,9 @@ async fn op_compile(
args: Value,
_data: BufVec,
) -> Result<Value, AnyError> {
- let cli_state = super::global_state2(&state);
- cli_state.check_unstable("Deno.compile");
+ super::check_unstable2(&state, "Deno.compile");
let args: CompileArgs = serde_json::from_value(args)?;
+ let cli_state = super::global_state2(&state);
let global_state = cli_state.clone();
let permissions = {
let state = state.borrow();
@@ -76,9 +76,9 @@ async fn op_transpile(
args: Value,
_data: BufVec,
) -> Result<Value, AnyError> {
- let cli_state = super::global_state2(&state);
- cli_state.check_unstable("Deno.transpile");
+ super::check_unstable2(&state, "Deno.transpile");
let args: TranspileArgs = serde_json::from_value(args)?;
+ let cli_state = super::global_state2(&state);
let global_state = cli_state.clone();
let result =
runtime_transpile(global_state, &args.sources, &args.options).await?;