mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 20:15:27 +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();
|
answer.make_ascii_lowercase();
|
||||||
let answer = answer.trim();
|
let answer = answer.trim();
|
||||||
|
|
||||||
let chosen_index = self
|
let chosen_index = self.choises.iter().position(|choise| choise.label.starts_with(answer));
|
||||||
.choises
|
|
||||||
.iter()
|
|
||||||
.position(|choise| choise.label.starts_with(answer));
|
|
||||||
|
|
||||||
if let Some(i) = chosen_index {
|
if let Some(i) = chosen_index {
|
||||||
return Ok(self.choises.remove(i).value);
|
return Ok(self.choises.remove(i).value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user