refact(review): handle upper-case input

This commit updates the `ask_user_action_for_package` function in the
`review` module to convert user input to lowercase. This ensures that
the user input is case-insensitive and improves the user experience.
This commit is contained in:
steven-omaha
2023-04-27 10:14:10 +02:00
parent 37409e9e60
commit d27cfa4a3b
+1 -1
View File
@@ -115,7 +115,7 @@ fn ask_user_action_for_package(supports_as_dependency: bool) -> Result<ReviewInt
print!("(q)uit? ");
stdout().lock().flush()?;
match read_single_char_from_terminal()? {
match read_single_char_from_terminal()?.to_ascii_lowercase() {
'a' => Ok(ReviewIntention::AsDependency),
'd' => Ok(ReviewIntention::Delete),
'g' => Ok(ReviewIntention::AssignGroup),