Skip to content

Commit

Permalink
fix(cargo-generate/init): remove parameter typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbz00 committed Aug 4, 2024
1 parent 4cdfff2 commit 4cf8e2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cargo_generate_hooks/init.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ fn template_book() {
}
}

fn prompt_variable(name: &str, prompt: &str) {
fn prompt_variable(name, prompt) {
let value = variable::prompt(prompt);
variable::set(name, value);
}

fn prompt_optional_string(name: &str, prompt: &str) {
fn prompt_optional_string(name, prompt) {
prompt_variable(name, `${prompt} (leave empty if none)`);
}

fn prompt_yes_no(name: &str, prompt: &str) -> bool {
fn prompt_yes_no(name, prompt) -> bool {
let value = switch variable::prompt(prompt, "No", ["Yes", "No"]) {
"Yes" => true,
"No" => false,
Expand Down

0 comments on commit 4cf8e2a

Please sign in to comment.