bug
This commit is contained in:
parent
e5cfcdaa37
commit
e0ee71dc88
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user