This commit is contained in:
Love 2023-01-19 12:16:50 +01:00
parent e5cfcdaa37
commit 2f5fcdb9dd
No known key found for this signature in database
GPG Key ID: A3C10DC241C8FA9F

View File

@ -17,13 +17,14 @@ async fn main() {
// Dont't perform a search if user has just watched, instead present the previous search // Dont't perform a search if user has just watched, instead present the previous search
if search_result.is_none() { if search_result.is_none() {
let search = readline.input("Search by name: "); let search = readline.input("Search by name: ");
let search = search.trim();
// If they want to quit, let them- // If they want to quit, let them-
if search.trim() == "q" { if search == "q" {
break; break;
} }
search_result = Some(Rc::new(parser.find(&search))); search_result = Some(Rc::new(parser.find(search)));
if search_result.as_ref().unwrap().len() == 0 { if search_result.as_ref().unwrap().len() == 0 {
println!("Nothing found"); println!("Nothing found");