Skip to content

Commit

Permalink
core: update rust to 1.78.0, core: update monodb to 2.8.2 (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored May 9, 2024
2 parents ef8f082 + 604a293 commit 22ae59d
Show file tree
Hide file tree
Showing 27 changed files with 156 additions and 160 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions git/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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 ==")
Expand Down
2 changes: 1 addition & 1 deletion rs/bin/openstream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions rs/packages/api/src/routes/accounts/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions rs/packages/api/src/routes/plans/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api/src/routes/stations/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions rs/packages/api/src/routes/users/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions rs/packages/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ pub struct StaticServer {
shutdown: Shutdown,
}

#[derive(Debug)]
struct SourceServerInner {}

impl StaticServer {
pub fn new(addrs: Vec<SocketAddr>, shutdown: Shutdown) -> Self {
Self { addrs, shutdown }
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ] }
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/db/src/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ impl Metadata {

#[derive(JsonSchema)]
#[schemars(rename = "JsonDocument")]
pub struct DocumentSchema(BTreeMap<String, serde_json::Value>);
pub struct DocumentSchema(#[allow(unused)] BTreeMap<String, serde_json::Value>);
1 change: 1 addition & 0 deletions rs/packages/env_logger/tests/log_tls_dtors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::thread_local_initializer_can_be_made_const)]
#[macro_use]
extern crate log;
extern crate env_logger;
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/media/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 22ae59d

Please sign in to comment.