From 7e05a98f30a87391d3f7ba48d0a7f0f1fb3426bb Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Wed, 6 Jan 2021 09:53:47 +0100 Subject: [PATCH] update to tokio 1.0 --- Cargo.toml | 10 +++++----- src/images/mod.rs | 2 +- src/lib.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8a60bc..325b8f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,13 @@ repository = "https://gitlab.com/news-flash/article_scraper" [dependencies] failure = "0.1" libxml = "0.2" -reqwest = { version = "0.10", features = ["json", "native-tls"] } -tokio = { version = "=0.2", features = ["macros"] } -url = "2.1" -regex = "1.3" +reqwest = { version = "0.11", features = ["json", "native-tls"] } +tokio = { version = "1.0", features = ["macros"] } +url = "2.2" +regex = "1.4" encoding_rs = "0.8" chrono = "0.4" -base64 = "0.12" +base64 = "0.13" image = "0.23" log = "0.4" parking_lot = "0.11" diff --git a/src/images/mod.rs b/src/images/mod.rs index 39b8498..0520fc3 100644 --- a/src/images/mod.rs +++ b/src/images/mod.rs @@ -318,7 +318,7 @@ mod tests { use std::fs; use std::io::Write; - #[tokio::test(basic_scheduler)] + #[tokio::test(flavor = "current_thread")] async fn close_tags() { let image_dowloader = ImageDownloader::new((2048, 2048)); let hdyleaflet = fs::read_to_string(r"./resources/tests/planetGnome/fedora31.html") diff --git a/src/lib.rs b/src/lib.rs index 8f716a6..e587895 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -791,7 +791,7 @@ mod tests { use crate::*; use reqwest::Client; - #[tokio::test(basic_scheduler)] + #[tokio::test(flavor = "current_thread")] async fn golem() { let config_path = PathBuf::from(r"./resources/tests/golem"); let out_path = PathBuf::from(r"./test_output"); @@ -810,7 +810,7 @@ mod tests { assert_eq!(article.author, Some(String::from("Hauke Gierow"))); } - #[tokio::test(basic_scheduler)] + #[tokio::test(flavor = "current_thread")] async fn phoronix() { let config_path = PathBuf::from(r"./resources/tests/phoronix"); let out_path = PathBuf::from(r"./test_output"); @@ -831,7 +831,7 @@ mod tests { ); } - #[tokio::test(basic_scheduler)] + #[tokio::test(flavor = "current_thread")] async fn youtube() { let config_path = PathBuf::from(r"./resources/tests/"); let url = url::Url::parse("https://www.youtube.com/watch?v=lHRkYLcmFY8").unwrap();