Skip to content

Commit

Permalink
Switch from dialoguer to inquire (#512)
Browse files Browse the repository at this point in the history
* fix: switch to inquire

* refactor: remove another line

* Update Cargo.toml

Co-authored-by: Kaur Kuut <[email protected]>

---------

Co-authored-by: Kaur Kuut <[email protected]>
  • Loading branch information
simbleau and xStrom committed Mar 10, 2024
1 parent 755fc5b commit 3b17341
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/scenes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ instant = { workspace = true }
# Used for the `download` command
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
byte-unit = "4.0.19"
dialoguer = "0.10.4"
inquire = "0.7.0"
ureq = "2.9.6"

[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
13 changes: 4 additions & 9 deletions examples/scenes/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ impl Download {
// For rustfmt, split prompt into its own line
const PROMPT: &str =
"Would you like to download a set of default svg files, as explained above?";
accepted = dialoguer::Confirm::new()
.with_prompt(PROMPT)
.wait_for_newline(true)
.interact()?;
accepted = inquire::Confirm::new(PROMPT).with_default(false).prompt()?;
} else {
println!("Nothing to download! All default downloads already created");
}
Expand All @@ -101,11 +98,9 @@ impl Download {
let cont = if self.auto {
false
} else {
dialoguer::Confirm::new()
.with_prompt("Would you like to try other downloads?")
.wait_for_newline(true)
.default(false)
.interact()?
inquire::Confirm::new("Would you like to try other downloads?")
.with_default(false)
.prompt()?
};
if !cont {
println!("{} downloads complete", completed_count);
Expand Down

0 comments on commit 3b17341

Please sign in to comment.