From c0d7d76570fb6babf8ddea1363f62dbff19bb0a0 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Mon, 25 Nov 2024 23:20:45 +0000 Subject: [PATCH] Remove getrandom dependency (#5226) * Remove getrandom dependency * fix --- Cargo.lock | 1 - Cargo.toml | 2 +- crates/api_common/Cargo.toml | 8 ++------ crates/db_schema/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1b1f3673..fa63a4b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2507,7 +2507,6 @@ dependencies = [ "encoding_rs", "enum-map", "futures", - "getrandom", "jsonwebtoken", "lemmy_db_schema", "lemmy_db_views", diff --git a/Cargo.toml b/Cargo.toml index bce88af67..b1553be5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,7 +131,7 @@ chrono = { version = "0.4.38", features = [ ], default-features = false } serde_json = { version = "1.0.132", features = ["preserve_order"] } base64 = "0.22.1" -uuid = { version = "1.11.0", features = ["serde", "v4"] } +uuid = { version = "1.11.0", features = ["serde"] } async-trait = "0.1.83" captcha = "0.0.9" anyhow = { version = "1.0.93", features = [ diff --git a/crates/api_common/Cargo.toml b/crates/api_common/Cargo.toml index 76f531ddb..3ae14717d 100644 --- a/crates/api_common/Cargo.toml +++ b/crates/api_common/Cargo.toml @@ -36,6 +36,7 @@ full = [ "futures", "jsonwebtoken", "mime", + "moka", ] [dependencies] @@ -58,7 +59,7 @@ uuid = { workspace = true, optional = true } tokio = { workspace = true, optional = true } reqwest = { workspace = true, optional = true } ts-rs = { workspace = true, optional = true } -moka.workspace = true +moka = { workspace = true, optional = true } anyhow.workspace = true actix-web = { workspace = true, optional = true } enum-map = { workspace = true } @@ -70,11 +71,6 @@ webpage = { version = "2.0", default-features = false, features = [ ], optional = true } encoding_rs = { version = "0.8.35", optional = true } jsonwebtoken = { version = "9.3.0", optional = true } -# necessary for wasmt compilation -getrandom = { version = "0.2.15", features = ["js"] } - -[package.metadata.cargo-shear] -ignored = ["getrandom"] [dev-dependencies] serial_test = { workspace = true } diff --git a/crates/db_schema/Cargo.toml b/crates/db_schema/Cargo.toml index bd83ede29..eac9d6ddd 100644 --- a/crates/db_schema/Cargo.toml +++ b/crates/db_schema/Cargo.toml @@ -75,7 +75,7 @@ tokio = { workspace = true, optional = true } tokio-postgres = { workspace = true, optional = true } tokio-postgres-rustls = { workspace = true, optional = true } rustls = { workspace = true, optional = true } -uuid = { workspace = true, features = ["v4"] } +uuid.workspace = true i-love-jesus = { workspace = true, optional = true } anyhow = { workspace = true } diesel-bind-if-some = { workspace = true, optional = true }