From 604a293e0cf599ed09552bb9dbc851e901f615e3 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Thu, 9 May 2024 01:47:05 -0300 Subject: [PATCH] core: update rust to 1.78.0 --- Cargo.lock | 30 +-- Cargo.toml | 12 +- git/hooks/pre-commit | 1 + rs/bin/openstream/Cargo.toml | 2 +- rs/packages/api/Cargo.toml | 2 +- rs/packages/api/src/routes/accounts/id.rs | 6 +- rs/packages/api/src/routes/plans/id.rs | 8 +- .../api/src/routes/stations/transfer.rs | 2 +- rs/packages/api/src/routes/users/id.rs | 4 +- rs/packages/api2/Cargo.toml | 2 +- rs/packages/assets/src/lib.rs | 3 - rs/packages/db/Cargo.toml | 2 +- rs/packages/db/src/metadata/mod.rs | 2 +- rs/packages/env_logger/tests/log_tls_dtors.rs | 1 + rs/packages/http/Cargo.toml | 2 +- rs/packages/media/Cargo.toml | 2 +- rs/packages/modify/src/traits.rs | 212 +++++++++--------- rs/packages/modify_derive/src/fields.rs | 4 +- rs/packages/owo-colors/Cargo.toml | 2 +- rs/packages/router/Cargo.toml | 2 +- rs/packages/serde-util/Cargo.toml | 2 +- rs/packages/serde-util/src/datetime.rs | 2 +- .../serde-util/src/timezone_datetime.rs | 2 +- rs/packages/source-alt/Cargo.toml | 2 +- rs/packages/stream/Cargo.toml | 2 +- rs/packages/stream/src/lib.rs | 3 - rs/packages/upload/Cargo.toml | 2 +- 27 files changed, 156 insertions(+), 160 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5320ec5d..62bcecb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -612,15 +612,15 @@ dependencies = [ [[package]] name = "bson" -version = "2.7.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58da0ae1e701ea752cc46c1bb9f39d5ecefc7395c3ecd526261a566d4f16e0c2" +checksum = "4d43b38e074cc0de2957f10947e376a1d88b9c4dbab340b590800cc1b2e066b2" dependencies = [ "ahash 0.8.3", "base64 0.13.1", "bitvec", "hex", - "indexmap 1.9.2", + "indexmap 2.2.6", "js-sys", "once_cell", "rand 0.8.5", @@ -2140,9 +2140,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hdrhistogram" @@ -2610,12 +2610,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.5", "serde", ] @@ -3393,7 +3393,7 @@ dependencies = [ "card-validate", "chrono", "idna 0.5.0", - "indexmap 2.0.0", + "indexmap 2.2.6", "lazy_static", "modify_derive", "phonenumber", @@ -3419,9 +3419,9 @@ dependencies = [ [[package]] name = "mongodb" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d517e7e678e1c9a2983ec704b43f3b22f38b1b7a247ea3ddb36d21578bf4e" +checksum = "ef206acb1b72389b49bc9985efe7eb1f8a9bb18e5680d262fac26c07f44025f1" dependencies = [ "async-trait", "base64 0.13.1", @@ -4771,7 +4771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9249e73e7504ef2da20601f82c7ec8943e5428f62a14a28d0c61c2cec2d1182" dependencies = [ "garde 0.11.2", - "indexmap 2.0.0", + "indexmap 2.2.6", "miette", "reqwest", "schematic_macros", @@ -4939,7 +4939,7 @@ version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.6", "itoa 1.0.5", "ryu", "serde", @@ -5043,7 +5043,7 @@ version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.6", "itoa 1.0.5", "ryu", "serde", @@ -5944,7 +5944,7 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", diff --git a/Cargo.toml b/Cargo.toml index f93588a3..0ca0df2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,14 +5,14 @@ panic = "abort" [profile.release] panic = "abort" -[profile.test ] -panic = "abort" +# [profile.test ] +# panic = "abort" -[profile.bench] -panic = "abort" +# [profile.bench] +# panic = "abort" -[profile.doc] -panic = "abort" +# [profile.doc] +# panic = "abort" [workspace] resolver = "2" diff --git a/git/hooks/pre-commit b/git/hooks/pre-commit index c171d003..36044742 100755 --- a/git/hooks/pre-commit +++ b/git/hooks/pre-commit @@ -77,6 +77,7 @@ await within(async () => { writeln("Done!") }).catch(e => { writeln("==============="); + console.error(e); writeln(chalk.red("Error")); writeln("Exit code: ", e.exitCode); writeln("== STDOUT ==") diff --git a/rs/bin/openstream/Cargo.toml b/rs/bin/openstream/Cargo.toml index 90f86d69..ffbc43bc 100644 --- a/rs/bin/openstream/Cargo.toml +++ b/rs/bin/openstream/Cargo.toml @@ -21,7 +21,7 @@ dotenv = "0.15.0" owo-colors = { version = "3.5.0", path = "../../packages/owo-colors" } config = { version = "0.1.0", path = "../../packages/config" } db = { version = "0.1.0", path = "../../packages/db" } -mongodb = "2.7.0" +mongodb = "2.8.2" drop-tracer = { version = "0.1.0", path = "../../packages/drop-tracer" } shutdown = { version = "0.1.0", path = "../../packages/shutdown" } which = "4.3.0" diff --git a/rs/packages/api/Cargo.toml b/rs/packages/api/Cargo.toml index 27065449..963839db 100644 --- a/rs/packages/api/Cargo.toml +++ b/rs/packages/api/Cargo.toml @@ -30,7 +30,7 @@ log = "0.4.17" macros = { version = "0.1.0", path = "../macros" } mailer = { version = "0.1.0", path = "../mailer" } media = { version = "0.1.0", path = "../media" } -mongodb = "2.7.0" +mongodb = "2.8.2" openapi = { version = "0.1.0", path = "../openapi" } owo-colors = { version = "3.5.0", path = "../owo-colors" } parking_lot = "0.12.1" diff --git a/rs/packages/api/src/routes/accounts/id.rs b/rs/packages/api/src/routes/accounts/id.rs index 2d9041e2..ba9d7a4e 100644 --- a/rs/packages/api/src/routes/accounts/id.rs +++ b/rs/packages/api/src/routes/accounts/id.rs @@ -201,7 +201,7 @@ pub mod patch { }; if let Some(ref name) = patch.name { - account.name = name.clone(); + account.name.clone_from(name); } if let Some(ref user_metadata) = patch.user_metadata { @@ -222,7 +222,7 @@ pub mod patch { return Err(HandleError::PlanNotFound(plan_id.to_string())); } - account.plan_id = plan.id.clone(); + account.plan_id.clone_from(&plan.id); account.limits.stations.total = plan.limits.stations; account.limits.listeners.total = plan.limits.listeners; @@ -262,7 +262,7 @@ pub mod patch { return Err(HandleError::PlanNotFound(plan_id.to_string())); } - account.plan_id = plan.id.clone(); + account.plan_id.clone_from(&plan.id); account.limits.stations.total = plan.limits.stations; account.limits.listeners.total = plan.limits.listeners; account.limits.storage.total = plan.limits.storage; diff --git a/rs/packages/api/src/routes/plans/id.rs b/rs/packages/api/src/routes/plans/id.rs index c141e589..0fd8c17e 100644 --- a/rs/packages/api/src/routes/plans/id.rs +++ b/rs/packages/api/src/routes/plans/id.rs @@ -356,19 +356,19 @@ pub mod patch { }; if let Some(ref identifier) = identifier { - plan.identifier = identifier.clone(); + plan.identifier.clone_from(identifier); } if let Some(ref slug) = slug { - plan.slug = slug.clone(); + plan.slug.clone_from(slug); } if let Some(ref display_name) = display_name { - plan.display_name = display_name.clone(); + plan.display_name.clone_from(display_name); } if let Some(ref color) = color { - plan.color = color.clone(); + plan.color.clone_from(color); } if let Some(price) = price { diff --git a/rs/packages/api/src/routes/stations/transfer.rs b/rs/packages/api/src/routes/stations/transfer.rs index ef2babfd..17f436af 100644 --- a/rs/packages/api/src/routes/stations/transfer.rs +++ b/rs/packages/api/src/routes/stations/transfer.rs @@ -161,7 +161,7 @@ pub mod post { let used_storage = tx_try!(Station::get_used_storage_with_session(&station.id, &mut session).await); - station.account_id = target_account.id.clone(); + station.account_id.clone_from(&target_account.id); // We do not update the listeners limits here, as when stream connections terminate // they will decrease the source account instead of the target account source_account.limits.stations.used = source_account.limits.stations.used.saturating_sub(1); diff --git a/rs/packages/api/src/routes/users/id.rs b/rs/packages/api/src/routes/users/id.rs index 65e27baa..03ee93ba 100644 --- a/rs/packages/api/src/routes/users/id.rs +++ b/rs/packages/api/src/routes/users/id.rs @@ -252,11 +252,11 @@ pub mod patch { let user = run_transaction!(session => { fetch_and_patch!(User, up_user, &user.id, Err(HandleError::UserNotFound(user.id)), session, { if let Some(first_name) = &first_name { - up_user.first_name = first_name.clone(); + up_user.first_name.clone_from(first_name); } if let Some(last_name) = &last_name { - up_user.last_name = last_name.clone(); + up_user.last_name.clone_from(last_name); } if let Some(opt_phone) = &phone { diff --git a/rs/packages/api2/Cargo.toml b/rs/packages/api2/Cargo.toml index a88e75fc..23507bf7 100644 --- a/rs/packages/api2/Cargo.toml +++ b/rs/packages/api2/Cargo.toml @@ -15,7 +15,7 @@ geoip = { version = "0.1.0", path = "../geoip" } http = { version = "0.2" } hyper = "0.14.27" macros = { version = "0.1.0", path = "../macros" } -mongodb = "2.7.0" +mongodb = "2.8.2" serde = { version = "1.0.171", features = ["derive"] } serde-util = { version = "0.1.0", path = "../serde-util" } thiserror = "1.0.43" diff --git a/rs/packages/assets/src/lib.rs b/rs/packages/assets/src/lib.rs index e5b609ba..3e6caf4f 100644 --- a/rs/packages/assets/src/lib.rs +++ b/rs/packages/assets/src/lib.rs @@ -30,9 +30,6 @@ pub struct StaticServer { shutdown: Shutdown, } -#[derive(Debug)] -struct SourceServerInner {} - impl StaticServer { pub fn new(addrs: Vec, shutdown: Shutdown) -> Self { Self { addrs, shutdown } diff --git a/rs/packages/db/Cargo.toml b/rs/packages/db/Cargo.toml index 9654e684..0051f6a5 100644 --- a/rs/packages/db/Cargo.toml +++ b/rs/packages/db/Cargo.toml @@ -20,7 +20,7 @@ test-analytics-base-measure = [] # syn = "1.0.103" # quote = "1.0.21" lazy_static = "1.4.0" -mongodb = "2.7.0" +mongodb = "2.8.2" serde = "1.0.145" tokio = { version = "1.29.0", features = [ "full" ] } chrono = { version = "0.4.22", features = [ "serde" ] } diff --git a/rs/packages/db/src/metadata/mod.rs b/rs/packages/db/src/metadata/mod.rs index fd49c83c..22208df1 100644 --- a/rs/packages/db/src/metadata/mod.rs +++ b/rs/packages/db/src/metadata/mod.rs @@ -93,4 +93,4 @@ impl Metadata { #[derive(JsonSchema)] #[schemars(rename = "JsonDocument")] -pub struct DocumentSchema(BTreeMap); +pub struct DocumentSchema(#[allow(unused)] BTreeMap); diff --git a/rs/packages/env_logger/tests/log_tls_dtors.rs b/rs/packages/env_logger/tests/log_tls_dtors.rs index cc801912..f972e426 100644 --- a/rs/packages/env_logger/tests/log_tls_dtors.rs +++ b/rs/packages/env_logger/tests/log_tls_dtors.rs @@ -1,3 +1,4 @@ +#![allow(clippy::thread_local_initializer_can_be_made_const)] #[macro_use] extern crate log; extern crate env_logger; diff --git a/rs/packages/http/Cargo.toml b/rs/packages/http/Cargo.toml index 6d9c285d..18262be1 100644 --- a/rs/packages/http/Cargo.toml +++ b/rs/packages/http/Cargo.toml @@ -10,7 +10,7 @@ db = { version = "0.1.0", path = "../db" } # merge-streams = "0.1.2" # tokio-stream = "0.1.11" hyper = "0.14.27" -mongodb = "2.7.0" +mongodb = "2.8.2" pin-project = "1.0.12" prex = { version = "0.1.0", path = "../prex" } serde = "1.0.149" diff --git a/rs/packages/media/Cargo.toml b/rs/packages/media/Cargo.toml index 24a36b44..d2484c8b 100644 --- a/rs/packages/media/Cargo.toml +++ b/rs/packages/media/Cargo.toml @@ -19,7 +19,7 @@ ffmpeg = { version = "0.1.0", path = "../ffmpeg" } futures-util = "0.3.25" hyper = { version = "0.14.27", features = ["full"] } log = "0.4.17" -mongodb = "2.7.0" +mongodb = "2.8.2" parking_lot = { version = "0.12.1", features = ["send_guard", "arc_lock"] } rand = "0.8.5" regex_static = "0.1.1" diff --git a/rs/packages/modify/src/traits.rs b/rs/packages/modify/src/traits.rs index 813952e3..cafb5aad 100644 --- a/rs/packages/modify/src/traits.rs +++ b/rs/packages/modify/src/traits.rs @@ -6,209 +6,211 @@ use std::hash::Hash; /// Trait to implement if one wants to make the `length` validator /// work for more types pub trait HasLen { - fn length(&self) -> u64; + #[allow(unused)] + fn length(&self) -> u64; } impl HasLen for String { - fn length(&self) -> u64 { - self.chars().count() as u64 - } + fn length(&self) -> u64 { + self.chars().count() as u64 + } } impl<'a> HasLen for &'a String { - fn length(&self) -> u64 { - self.chars().count() as u64 - } + fn length(&self) -> u64 { + self.chars().count() as u64 + } } impl<'a> HasLen for &'a str { - fn length(&self) -> u64 { - self.chars().count() as u64 - } + fn length(&self) -> u64 { + self.chars().count() as u64 + } } impl<'a> HasLen for Cow<'a, str> { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for Vec { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, T> HasLen for &'a Vec { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for &[T] { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for [T; N] { - fn length(&self) -> u64 { - N as u64 - } + fn length(&self) -> u64 { + N as u64 + } } impl HasLen for &[T; N] { - fn length(&self) -> u64 { - N as u64 - } + fn length(&self) -> u64 { + N as u64 + } } impl<'a, K, V, S> HasLen for &'a HashMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for HashMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, T, S> HasLen for &'a HashSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for HashSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, K, V> HasLen for &'a BTreeMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for BTreeMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, T> HasLen for &'a BTreeSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for BTreeSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, K, V> HasLen for &'a IndexMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for IndexMap { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl<'a, T> HasLen for &'a IndexSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } impl HasLen for IndexSet { - fn length(&self) -> u64 { - self.len() as u64 - } + fn length(&self) -> u64 { + self.len() as u64 + } } /// Trait to implement if one wants to make the `contains` validator /// work for more types pub trait Contains { - type Needle<'a> - where - Self: 'a; - #[must_use] - fn has_element(&self, needle: Self::Needle<'_>) -> bool; + type Needle<'a> + where + Self: 'a; + #[allow(unused)] + #[must_use] + fn has_element(&self, needle: Self::Needle<'_>) -> bool; } impl Contains for Vec where - T: PartialEq, + T: PartialEq, { - type Needle<'a> = &'a T where Self: 'a; - fn has_element(&self, needle: Self::Needle<'_>) -> bool { - self.iter().any(|a| a == needle) - } + type Needle<'a> = &'a T where Self: 'a; + fn has_element(&self, needle: Self::Needle<'_>) -> bool { + self.iter().any(|a| a == needle) + } } impl Contains for &Vec where - T: PartialEq, + T: PartialEq, { - type Needle<'a> = &'a T where Self: 'a; - fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { - self.iter().any(|a| a == needle) - } + type Needle<'a> = &'a T where Self: 'a; + fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { + self.iter().any(|a| a == needle) + } } impl Contains for HashMap where - T: PartialEq + Eq + Hash, + T: PartialEq + Eq + Hash, { - type Needle<'a> = &'a T where Self: 'a; - fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { - self.contains_key(needle) - } + type Needle<'a> = &'a T where Self: 'a; + fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { + self.contains_key(needle) + } } impl Contains for &HashMap where - T: PartialEq + Eq + Hash, + T: PartialEq + Eq + Hash, { - type Needle<'a> = &'a T where Self: 'a; - fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { - self.contains_key(needle) - } + type Needle<'a> = &'a T where Self: 'a; + fn has_element<'a>(&'a self, needle: Self::Needle<'a>) -> bool { + self.contains_key(needle) + } } impl Contains for String { - type Needle<'a> = &'a str; - fn has_element(&self, needle: &str) -> bool { - self.contains(needle) - } + type Needle<'a> = &'a str; + fn has_element(&self, needle: &str) -> bool { + self.contains(needle) + } } impl Contains for &String { - type Needle<'a> = &'a str where Self: 'a; - fn has_element(&self, needle: &str) -> bool { - self.contains(needle) - } + type Needle<'a> = &'a str where Self: 'a; + fn has_element(&self, needle: &str) -> bool { + self.contains(needle) + } } impl Contains for &str { - type Needle<'a> = &'a str where Self: 'a; - fn has_element(&self, needle: &str) -> bool { - self.contains(needle) - } + type Needle<'a> = &'a str where Self: 'a; + fn has_element(&self, needle: &str) -> bool { + self.contains(needle) + } } impl Contains for Cow<'_, str> { - type Needle<'a> = &'a str where Self: 'a; - fn has_element(&self, needle: &str) -> bool { - self.contains(needle) - } + type Needle<'a> = &'a str where Self: 'a; + fn has_element(&self, needle: &str) -> bool { + self.contains(needle) + } } diff --git a/rs/packages/modify_derive/src/fields.rs b/rs/packages/modify_derive/src/fields.rs index ba0f4f87..bad9d15c 100644 --- a/rs/packages/modify_derive/src/fields.rs +++ b/rs/packages/modify_derive/src/fields.rs @@ -214,9 +214,7 @@ fn try_extract_option(ty: &syn::Type) -> Option<&syn::Type> { return None; }; - let Some(arg) = ab.args.last() else { - return None; - }; + let arg = ab.args.last()?; match arg { syn::GenericArgument::Type(ty) => Some(ty), diff --git a/rs/packages/owo-colors/Cargo.toml b/rs/packages/owo-colors/Cargo.toml index 02a10ac4..64bb0efb 100644 --- a/rs/packages/owo-colors/Cargo.toml +++ b/rs/packages/owo-colors/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "owo-colors" version = "3.5.0" -rust-version = "1.51" +rust-version = "1.55" authors = ["jam1garner <8260240+jam1garner@users.noreply.github.com>"] edition = "2018" documentation = "https://docs.rs/owo-colors" diff --git a/rs/packages/router/Cargo.toml b/rs/packages/router/Cargo.toml index 0c6d0fc8..65a6ed34 100644 --- a/rs/packages/router/Cargo.toml +++ b/rs/packages/router/Cargo.toml @@ -12,7 +12,7 @@ futures = "0.3.25" http = { version = "0.1.0", path = "../http" } hyper = { version = "0.14.27", features = ["full"] } log = "0.4.17" -mongodb = "2.7.0" +mongodb = "2.8.2" owo-colors = { version = "3.5.0", path = "../owo-colors" } prex = { version = "0.1.0", path = "../prex" } serde = { version = "1.0.147", features = ["derive"] } diff --git a/rs/packages/serde-util/Cargo.toml b/rs/packages/serde-util/Cargo.toml index 93476306..638b11a8 100644 --- a/rs/packages/serde-util/Cargo.toml +++ b/rs/packages/serde-util/Cargo.toml @@ -12,7 +12,7 @@ chrono = { version = "0.4", features = ["serde"] } hyper = "0.14.27" iso8601-timestamp = "0.2.7" log = "0.4.17" -mongodb = "2.7.0" +mongodb = "2.8.2" openapi = { version = "0.1.0", path = "../openapi" } schemars = { version = "0.8.16", features = ["preserve_order", "chrono"] } serde = "1" diff --git a/rs/packages/serde-util/src/datetime.rs b/rs/packages/serde-util/src/datetime.rs index 8e6fa710..77850118 100644 --- a/rs/packages/serde-util/src/datetime.rs +++ b/rs/packages/serde-util/src/datetime.rs @@ -35,7 +35,7 @@ openapi::impl_schema_from!(DateTime, DateTimeSchema); #[derive(JsonSchema)] #[schemars(rename = "DateTime")] -struct DateTimeSchema(chrono::DateTime); +struct DateTimeSchema(#[allow(unused)] chrono::DateTime); impl Display for DateTime { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { diff --git a/rs/packages/serde-util/src/timezone_datetime.rs b/rs/packages/serde-util/src/timezone_datetime.rs index 6339e636..5e755f24 100644 --- a/rs/packages/serde-util/src/timezone_datetime.rs +++ b/rs/packages/serde-util/src/timezone_datetime.rs @@ -17,7 +17,7 @@ openapi::impl_schema_from!(TimezoneDateTime, DateTimeSchema); #[derive(JsonSchema)] #[schemars(rename = "TimezoneDateTime")] -struct DateTimeSchema(chrono::DateTime); +struct DateTimeSchema(#[allow(unused)] chrono::DateTime); impl Display for TimezoneDateTime { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { diff --git a/rs/packages/source-alt/Cargo.toml b/rs/packages/source-alt/Cargo.toml index 3285539b..1471ff7f 100644 --- a/rs/packages/source-alt/Cargo.toml +++ b/rs/packages/source-alt/Cargo.toml @@ -31,7 +31,7 @@ geoip = { version = "0.1.0", path = "../geoip" } rand = "0.8.5" socket2 = "0.5.2" thiserror = "1.0.40" -mongodb = "2.7.0" +mongodb = "2.8.2" serde = { version = "1.0.160", features = ["derive"] } lazy-regex = "2.5.0" serde-util = { version = "0.1.0", path = "../serde-util" } diff --git a/rs/packages/stream/Cargo.toml b/rs/packages/stream/Cargo.toml index 5a403184..e43334cc 100644 --- a/rs/packages/stream/Cargo.toml +++ b/rs/packages/stream/Cargo.toml @@ -22,7 +22,7 @@ futures = "0.3.25" http = { version = "0.1.0", path = "../http" } db = { version = "0.1.0", path = "../db" } serde-util = { version = "0.1.0", path = "../serde-util" } -mongodb = "2.7.0" +mongodb = "2.8.2" parking_lot = "0.12.1" constants = { version = "0.1.0", path = "../../config/constants" } thiserror = "1.0.38" diff --git a/rs/packages/stream/src/lib.rs b/rs/packages/stream/src/lib.rs index 82ace267..01824eb6 100644 --- a/rs/packages/stream/src/lib.rs +++ b/rs/packages/stream/src/lib.rs @@ -72,9 +72,6 @@ pub struct Status { status: usize, } -#[derive(Debug)] -struct StreamServerInner {} - #[derive(Debug, thiserror::Error)] pub enum StreamServerError { #[error("io error: {0}")] diff --git a/rs/packages/upload/Cargo.toml b/rs/packages/upload/Cargo.toml index f99374c4..970cbcef 100644 --- a/rs/packages/upload/Cargo.toml +++ b/rs/packages/upload/Cargo.toml @@ -18,7 +18,7 @@ hex = "0.4.3" log = "0.4.17" # logger = { version = "0.1.0", path = "../logger" } md-5 = "0.10.5" -mongodb = "2.7.0" +mongodb = "2.8.2" serde-util = { version = "0.1.0", path = "../serde-util" } sha2 = "0.10.6" stream-util = { version = "0.1.0", path = "../stream-util" }