File: relax-deps.diff

package info (click to toggle)
rust-rebuilderd 0.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 428 kB
  • sloc: sql: 679; makefile: 12
file content (52 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -101,7 +101,7 @@
 version = "0.4.17"
 
 [dependencies.rand]
-version = "0.9"
+version = "0.8"
 
 [dependencies.rebuilderd-common]
 version = "=0.23.0"
@@ -114,13 +114,13 @@
 version = "1.0.81"
 
 [dependencies.tokio]
-version = "1.44.2"
+version = "1"
 
 [dependencies.toml]
 version = "0.8"
 
 [dependencies.zstd]
-version = "0.13.3"
+version = "0.13"
 
 [dev-dependencies.tokio-test]
 version = "0.4.4"
--- b/src/auth.rs
+++ a/src/auth.rs
@@ -1,7 +1,8 @@
 use crate::api;
 use crate::config::Config;
 use actix_web::HttpRequest;
-use rand::distr::{Alphanumeric, SampleString};
+use rand::distributions::Alphanumeric;
+use rand::prelude::*;
 use rebuilderd_common::api::*;
 use rebuilderd_common::errors::*;
 use std::env;
@@ -68,7 +69,11 @@ pub fn setup_auth_cookie() -> Result<String> {
         cookie
     } else {
         debug!("Generating random cookie");
-        Alphanumeric.sample_string(&mut rand::rng(), 32)
+        thread_rng()
+            .sample_iter(&Alphanumeric)
+            .take(32)
+            .map(char::from)
+            .collect()
     };
 
     let cookie_path = if let Ok(cookie_path) = env::var("REBUILDERD_COOKIE_PATH") {