mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
chore: cargo fmt
This commit is contained in:
parent
f916f4d419
commit
e2e28b008f
@ -223,10 +223,7 @@ impl<'a, T: Default> ChoicePrompt<'a, T> {
|
||||
answer.make_ascii_lowercase();
|
||||
let answer = answer.trim();
|
||||
|
||||
let chosen_index = self
|
||||
.choises
|
||||
.iter()
|
||||
.position(|choise| choise.label.starts_with(answer));
|
||||
let chosen_index = self.choises.iter().position(|choise| choise.label.starts_with(answer));
|
||||
|
||||
if let Some(i) = chosen_index {
|
||||
return Ok(self.choises.remove(i).value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user