Skip to content

Commit a04e6f9

Browse files
committed
fix workspace resolver definition
1 parent c0abb2f commit a04e6f9

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[workspace]
2-
workspace.resolver = "2"
2+
resolver = "2"
33
members = ["scraper", "airbnb"]

airbnb/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
use serde::Serialize;
12
use std::error::Error;
23
use std::thread;
34
use std::time::Duration;
4-
use thirtyfour::{prelude::{WebDriverError, ElementWaitable}, By, DesiredCapabilities, WebDriver, WebElement};
5+
use thirtyfour::{
6+
prelude::{ElementWaitable, WebDriverError},
7+
By, DesiredCapabilities, WebDriver, WebElement,
8+
};
59
use url::Url;
6-
use serde::Serialize;
710

811
pub async fn scrape_airbnb(place: &str) -> Result<(), Box<dyn Error>> {
912
let driver = initialize_driver().await?;
@@ -69,7 +72,6 @@ async fn load_next_page(
6972
next_page_button: WebElement,
7073
driver: &WebDriver,
7174
) -> Result<(), Box<dyn Error>> {
72-
7375
next_page_button.click().await?;
7476
thread::sleep(Duration::from_secs(2));
7577

scraper/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::error::Error;
22

33
#[tokio::main]
4-
async fn main() -> Result<(),Box<dyn Error>>{
4+
async fn main() -> Result<(), Box<dyn Error>> {
55
airbnb::scrape_airbnb("Rome").await?;
66
Ok(())
7-
}
7+
}

0 commit comments

Comments
 (0)