Skip to content

Commit

Permalink
Changed run as an alias to run-c
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavik-goplani committed Jul 12, 2024
1 parent adc1110 commit 6380803
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ enum Mode {
/// Compiles the program and runs it with the Rust HVM implementation.
RunRs(RunArgs),
/// Compiles the program and runs it with the C HVM implementation.
#[command(alias = "run")]
RunC(RunArgs),
/// Compiles the program and runs it with the C HVM implementation.
Run(RunArgs),
/// Compiles the program and runs it with the Cuda HVM implementation.
RunCu(RunArgs),
/// Compiles the program to hvm and prints to stdout.
Expand Down Expand Up @@ -310,8 +309,7 @@ fn execute_cli_mode(mut cli: Cli) -> Result<(), Diagnostics> {
println!("{}", hvm_book_show_pretty(&compile_res.hvm_book));
}

Mode::Run(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
| Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
| Mode::RunCu(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
| Mode::RunRs(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) => {
let CliRunOpts { linear, print_stats } = run_opts;
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/cli__debug_list_map.bend.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ error: unexpected argument '-d' found

tip: to pass '-d' as a value, use '-- -d'

Usage: bend run [OPTIONS] <PATH> [ARGUMENTS]...
Usage: bend run-c [OPTIONS] <PATH> [ARGUMENTS]...

For more information, try '--help'.
2 changes: 1 addition & 1 deletion tests/snapshots/cli__debug_u60_to_nat.bend.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ error: unexpected argument '-d' found

tip: to pass '-d' as a value, use '-- -d'

Usage: bend run [OPTIONS] <PATH> [ARGUMENTS]...
Usage: bend run-c [OPTIONS] <PATH> [ARGUMENTS]...

For more information, try '--help'.

0 comments on commit 6380803

Please sign in to comment.