From 6ad77d8daaa52a73ea8f40cf04bee20d1094a897 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Tue, 9 May 2023 17:35:21 +0200 Subject: [PATCH] fix: limit serde_with features --- Cargo.toml | 5 ++++- cli/src/main.rs | 4 +++- codegen/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fa5105c..a1ac42a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,10 @@ reqwest = { version = "0.11.11", default-features = false, features = [ tokio = { version = "1.20.0", features = ["macros", "time"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.82" -serde_with = { version = "3.0.0", features = ["json"] } +serde_with = { version = "3.0.0", default-features = false, features = [ + "macros", + "json", +] } rand = "0.8.5" time = { version = "0.3.15", features = [ "macros", diff --git a/cli/src/main.rs b/cli/src/main.rs index 41b60d8..44c94eb 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,4 +1,4 @@ -use std::path::PathBuf; +use std::{path::PathBuf, time::Duration}; use anyhow::{Context, Result}; use clap::{Parser, Subcommand, ValueEnum}; @@ -300,6 +300,7 @@ async fn download_video( .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; rv:107.0) Gecko/20100101 Firefox/107.0") .gzip(true) .brotli(true) + .timeout(Duration::from_secs(10)) .build() .expect("unable to build the HTTP client"); @@ -334,6 +335,7 @@ async fn download_videos( .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; rv:107.0) Gecko/20100101 Firefox/107.0") .gzip(true) .brotli(true) + .timeout(Duration::from_secs(10)) .build() .expect("unable to build the HTTP client"); diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 74525e3..6f48494 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -11,7 +11,7 @@ tokio = { version = "1.20.0", features = ["macros", "rt-multi-thread"] } futures = "0.3.21" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.82" -serde_with = "3.0.0" +serde_with = { version = "3.0.0", default-features = false, features = ["macros"] } anyhow = "1.0" log = "0.4.17" env_logger = "0.10.0"