From 1bdbef4522f5ce27085da9c8c06f3b544fc97b4b Mon Sep 17 00:00:00 2001 From: "Gross,Henning (BI X) BIX-DE-I" Date: Thu, 25 Jan 2024 13:42:36 +0800 Subject: [PATCH] fix long name of new sort flag --- README.md | 2 +- src/timetable.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0d51b2c..bb77de8 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Options: -m, --month MONTH Set Month to search timetable for (default: today's month) -y, --year YEAR Set Year to search timetable for (default: today's year) -w, --wait SECONDS Set Wait time in seconds for Renfe search result page (default: 2) - -s, --sorted Option to sort the timetable by Duration + -s, --sort Option to sort the timetable by Duration -h, --help Print this help menu ``` diff --git a/src/timetable.rs b/src/timetable.rs index 7db974b..3fbfecb 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -109,7 +109,7 @@ pub fn search_timetable( .unwrap() .click() .unwrap(); -let elem = tab.type_str(&origin).unwrap(); + let elem = tab.type_str(&origin).unwrap(); elem.press_key("Tab").unwrap(); println!("adding destination station"); @@ -117,7 +117,7 @@ let elem = tab.type_str(&origin).unwrap(); .unwrap() .click() .unwrap(); -let elem = tab.type_str(&destination).unwrap(); + let elem = tab.type_str(&destination).unwrap(); elem.press_key("Tab").unwrap(); println!("adding day"); @@ -125,7 +125,7 @@ let elem = tab.type_str(&destination).unwrap(); .unwrap() .click() .unwrap(); -let elem = tab.type_str(&day).unwrap(); + let elem = tab.type_str(&day).unwrap(); elem.press_key("Tab").unwrap(); println!("adding month"); @@ -133,7 +133,7 @@ let elem = tab.type_str(&day).unwrap(); .unwrap() .click() .unwrap(); -tab.type_str(&to_renfe_month(month)).unwrap(); + tab.type_str(&to_renfe_month(month)).unwrap(); elem.press_key("Tab").unwrap(); println!("adding year"); @@ -141,7 +141,7 @@ tab.type_str(&to_renfe_month(month)).unwrap(); .unwrap() .click() .unwrap(); -let elem = tab.type_str(&year).unwrap(); + let elem = tab.type_str(&year).unwrap(); elem.press_key("Tab").unwrap(); println!("searching timetable"); @@ -152,7 +152,7 @@ let elem = tab.type_str(&year).unwrap(); sleep(Duration::from_secs(wait)); -// wait on navigating to search result page + // wait on navigating to search result page tab.wait_until_navigated() .unwrap() .wait_for_elements_by_xpath(r#"//*[@id="contenedor"]"#)