Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Oct 6, 2023
1 parent ede3365 commit ed07ba8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
53 changes: 27 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ futures-util = "0.3"
once_cell = "1.17"
thiserror = "1.0"
async-trait = "0.1"
dialoguer = "0.10"
dialoguer = "0.11"
dunce = "1.0"
lz4_flex = "0.11"
path-clean = "1.0"
Expand All @@ -81,7 +81,7 @@ urlencoding = "2.1"

tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
mlua = { version = "0.9.0", features = ["luau", "luau-jit", "serialize"] }
mlua = { version = "0.9.1", features = ["luau", "luau-jit", "serialize"] }
tokio = { version = "1.24", features = ["full", "tracing"] }

### SERDE
Expand Down
14 changes: 9 additions & 5 deletions src/lune/builtins/stdio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,27 @@ fn prompt(options: PromptOptions) -> LuaResult<PromptResult> {
.allow_empty(true)
.with_prompt(options.text.unwrap_or_default())
.with_initial_text(options.default_string.unwrap_or_default())
.interact_text()?;
.interact_text()
.into_lua_err()?;
Ok(PromptResult::String(input))
}
PromptKind::Confirm => {
let mut prompt = Confirm::with_theme(&theme);
if let Some(b) = options.default_bool {
prompt.default(b);
prompt = prompt.default(b);
};
let result = prompt
.with_prompt(&options.text.expect("Missing text in prompt options"))
.interact()?;
.interact()
.into_lua_err()?;
Ok(PromptResult::Boolean(result))
}
PromptKind::Select => {
let chosen = Select::with_theme(&theme)
.with_prompt(&options.text.unwrap_or_default())
.items(&options.options.expect("Missing options in prompt options"))
.interact_opt()?;
.interact_opt()
.into_lua_err()?;
Ok(match chosen {
Some(idx) => PromptResult::Index(idx + 1),
None => PromptResult::None,
Expand All @@ -96,7 +99,8 @@ fn prompt(options: PromptOptions) -> LuaResult<PromptResult> {
let chosen = MultiSelect::with_theme(&theme)
.with_prompt(&options.text.unwrap_or_default())
.items(&options.options.expect("Missing options in prompt options"))
.interact_opt()?;
.interact_opt()
.into_lua_err()?;
Ok(match chosen {
None => PromptResult::None,
Some(indices) => {
Expand Down

0 comments on commit ed07ba8

Please sign in to comment.