summaryrefslogtreecommitdiff
path: root/cli/tools
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-09-04 01:33:35 +0200
committerGitHub <noreply@github.com>2021-09-04 01:33:35 +0200
commit44ca3ce6aeb99cb968776f5f13420e76acbc8117 (patch)
tree95bd193752eb3ddbf8ae88183c374b28e62beb7e /cli/tools
parentd93570a6195d2be5fe448bb0d33d4f64e839676e (diff)
refactor: factor out DenoSubcommand enum variant into structs (#11896)
This commit refactors "DenoSubcommand" enum in a way that variants no longer contain anonymous structures but instead contain dedicated structures for each subcommand, eg. "DenoSubcommand::Lint" now contains "LintSubcommand".
Diffstat (limited to 'cli/tools')
-rw-r--r--cli/tools/standalone.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/tools/standalone.rs b/cli/tools/standalone.rs
index 18d887588..33bc7881e 100644
--- a/cli/tools/standalone.rs
+++ b/cli/tools/standalone.rs
@@ -3,6 +3,7 @@
use crate::deno_dir::DenoDir;
use crate::flags::DenoSubcommand;
use crate::flags::Flags;
+use crate::flags::RunFlags;
use deno_core::error::bail;
use deno_core::error::AnyError;
use deno_core::serde_json;
@@ -199,9 +200,9 @@ pub fn compile_to_runtime_flags(
// change to `Flags` should be reflected here.
Ok(Flags {
argv: baked_args,
- subcommand: DenoSubcommand::Run {
+ subcommand: DenoSubcommand::Run(RunFlags {
script: "placeholder".to_string(),
- },
+ }),
allow_env: flags.allow_env,
allow_hrtime: flags.allow_hrtime,
allow_net: flags.allow_net,