From cdfb1182ab1a594d1fa236816d1a03e78c128bb1 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Mon, 21 Aug 2023 11:32:23 +0200 Subject: [PATCH] Introduce `cargo-deny` Add `deny.toml` with a few exceptions, and update certain dependencies to get rid of duplicates. Running `cargo deny check` will yield some warnings still, but no errors. --- radicle-httpd/Cargo.toml | 8 ++++---- radicle-httpd/src/api/v1/sessions.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/radicle-httpd/Cargo.toml b/radicle-httpd/Cargo.toml index 72dbbbe9e..ad94e6278 100644 --- a/radicle-httpd/Cargo.toml +++ b/radicle-httpd/Cargo.toml @@ -18,13 +18,13 @@ logfmt = [ anyhow = { version = "1" } axum = { version = "0.6.7", default-features = false, features = ["headers", "json", "query", "tokio"] } axum-auth = { version= "0.4.0", default-features = false, features = ["auth-bearer"] } -axum-server = { version = "0.4.4", default-features = false } -chrono = { version = "0.4.22" } -fastrand = { version = "1.9.0" } +axum-server = { version = "0.5.1", default-features = false } +chrono = { version = "0.4.22", default-features = false } +fastrand = { version = "2.0.0" } flate2 = { version = "1" } hyper = { version = "0.14.17", default-features = false } lexopt = { version = "0.2.1" } -lru = { version = "0.10.0" } +lru = { version = "0.11.0" } nonempty = { version = "0.8.1", features = ["serialize"] } radicle-surf = { version = "0.14.0", default-features = false, features = ["serde"] } serde = { version = "1", features = ["derive"] } diff --git a/radicle-httpd/src/api/v1/sessions.rs b/radicle-httpd/src/api/v1/sessions.rs index 340951fbf..9e99f9e2d 100644 --- a/radicle-httpd/src/api/v1/sessions.rs +++ b/radicle-httpd/src/api/v1/sessions.rs @@ -37,7 +37,7 @@ struct AuthChallenge { /// Create session. /// `POST /sessions` async fn session_create_handler(State(ctx): State) -> impl IntoResponse { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); let session_id = repeat_with(|| rng.alphanumeric()) .take(32) .collect::();