From 689a72e6cdd5d736219a19eaf6c010173a8ea77e Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Sun, 24 Mar 2024 17:54:30 +0100 Subject: [PATCH] reqwest 0.12 --- .gitlab-ci.yml | 4 ++-- article_scraper/Cargo.toml | 8 ++++---- article_scraper/src/images/mod.rs | 5 ++--- article_scraper_cli/Cargo.toml | 8 ++++---- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55d3464..c6a7149 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: run-build: stage: build - image: rust:latest + image: rust:1.77 before_script: - rustup component add rustfmt - rustup component add clippy @@ -12,4 +12,4 @@ run-build: - rustc --version && cargo --version - cargo fmt -- --check - cargo clippy --all-targets --all-features -- -D warnings - - cargo build --release --jobs 1 + - cargo build --release diff --git a/article_scraper/Cargo.toml b/article_scraper/Cargo.toml index 1c7d2ac..9603c6b 100644 --- a/article_scraper/Cargo.toml +++ b/article_scraper/Cargo.toml @@ -13,16 +13,16 @@ exclude = ["resources/tests"] [dependencies] thiserror = "1.0" libxml = "0.3" -reqwest = { version = "0.11", features = ["json", "native-tls", "gzip", "brotli", "stream"] } +reqwest = { version = "0.12", features = ["json", "native-tls", "gzip", "brotli", "stream"] } tokio = { version = "1", features = ["macros", "fs", "io-util"] } url = "2.5" regex = "1.10" encoding_rs = "0.8" chrono = "0.4" -base64 = "0.21" -image = "0.24" +base64 = "0.22" +image = "0.25" log = "0.4" -rust-embed="8.2" +rust-embed="8.3" once_cell = "1.19" escaper = "0.1" futures = "0.3" diff --git a/article_scraper/src/images/mod.rs b/article_scraper/src/images/mod.rs index 5a2d133..6d97fd8 100644 --- a/article_scraper/src/images/mod.rs +++ b/article_scraper/src/images/mod.rs @@ -6,7 +6,7 @@ use crate::constants; use crate::util::Util; use base64::Engine; use futures::StreamExt; -use image::ImageOutputFormat; +use image::ImageFormat; use libxml::parser::Parser; use libxml::tree::{Node, SaveOptions}; use libxml::xpath::Context; @@ -324,8 +324,7 @@ impl ImageDownloader { image::imageops::FilterType::Lanczos3, ); let mut resized_buf: Vec = Vec::new(); - if let Err(error) = - image.write_to(&mut Cursor::new(&mut resized_buf), ImageOutputFormat::Png) + if let Err(error) = image.write_to(&mut Cursor::new(&mut resized_buf), ImageFormat::Png) { log::error!("Failed to save resized image to resize: {}", error); return None; diff --git a/article_scraper_cli/Cargo.toml b/article_scraper_cli/Cargo.toml index 1ef293e..7c24fd2 100644 --- a/article_scraper_cli/Cargo.toml +++ b/article_scraper_cli/Cargo.toml @@ -9,10 +9,10 @@ repository = "https://gitlab.com/news-flash/article_scraper" [dependencies] article_scraper = { path = "../article_scraper/" } -clap = { version = "4.2", features = [ "derive" ] } +clap = { version = "4.5", features = [ "derive" ] } simplelog = "0.12" log = "0.4" -url = "2.3" -reqwest = { version = "0.11", features = ["json", "native-tls", "gzip", "brotli", "stream"] } -tokio = { version = "1.27", features = ["macros", "fs", "io-util", "rt-multi-thread" ] } +url = "2.5" +reqwest = { version = "0.12", features = ["json", "native-tls", "gzip", "brotli", "stream"] } +tokio = { version = "1", features = ["macros", "fs", "io-util", "rt-multi-thread" ] } indicatif = "0.17" \ No newline at end of file