diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-11-11 09:01:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 17:01:48 +0000 |
commit | 9f4a45561f4a01019cdbff86e2056de0296e791b (patch) | |
tree | a9c2c4b1664d6f4640115345882ae068c1a5a216 /cli/args/flags.rs | |
parent | 56e76242f3d7082e412bc698ebc737d24910cb60 (diff) |
perf: snapshot runtime ops (#21127)
Closes https://github.com/denoland/deno/issues/21135
~1ms startup time improvement
---------
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 5261411ce..4bad30140 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -307,6 +307,12 @@ pub enum DenoSubcommand { Vendor(VendorFlags), } +impl DenoSubcommand { + pub fn is_run(&self) -> bool { + matches!(self, Self::Run(_)) + } +} + impl Default for DenoSubcommand { fn default() -> DenoSubcommand { DenoSubcommand::Repl(ReplFlags { |