Skip to content
Snippets Groups Projects
Commit 59edfb74 authored by Marvin's avatar Marvin
Browse files

removed unused mutable variables

parent cda86b79
No related branches found
No related tags found
No related merge requests found
Pipeline #140354 passed
...@@ -53,7 +53,7 @@ async fn get_html_products(config: &Config) -> Result<Vec<Product>, CmdError> { ...@@ -53,7 +53,7 @@ async fn get_html_products(config: &Config) -> Result<Vec<Product>, CmdError> {
println!("Fetching items from amd Website"); println!("Fetching items from amd Website");
// navigate to amd-site // navigate to amd-site
let mut webc = ClientBuilder::native() let webc = ClientBuilder::native()
.connect(config.webdriver_url.as_str()) .connect(config.webdriver_url.as_str())
.await .await
.expect("failed to connect to WebDriver"); .expect("failed to connect to WebDriver");
...@@ -70,7 +70,7 @@ async fn get_html_products(config: &Config) -> Result<Vec<Product>, CmdError> { ...@@ -70,7 +70,7 @@ async fn get_html_products(config: &Config) -> Result<Vec<Product>, CmdError> {
//Interate over all items in the shop and parse the relevant strings //Interate over all items in the shop and parse the relevant strings
// in the struct Product // in the struct Product
let mut products: Vec<Product> = Vec::new(); let mut products: Vec<Product> = Vec::new();
for mut el in html_elements { for el in html_elements {
let name = el.find(Locator::Css(".shop-title")).await?.text().await?; let name = el.find(Locator::Css(".shop-title")).await?.text().await?;
let price = el.find(Locator::Css(".shop-price")).await?.text().await?; let price = el.find(Locator::Css(".shop-price")).await?.text().await?;
let avail = el.find(Locator::Css(".shop-links")).await?.text().await?; let avail = el.find(Locator::Css(".shop-links")).await?.text().await?;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment