Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use axum::{
http::StatusCode,
Json,
};
use rand::{Rng, RngCore};
use rand::{Rng, RngExt};
use serde::Deserialize;
use serde_json::{json, Value};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use axum::{
http::StatusCode,
Json,
};
use rand::RngCore;
use rand::Rng;
use regex::Regex;
use serde::Deserialize;
use serde_json::{json, Value};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ fn hash_name(value: &str) -> bool {
}

fn new_report_id(prefix: &str) -> String {
use rand::RngCore;
use rand::Rng;
let mut bytes = [0u8; 16];
rand::rng().fill_bytes(&mut bytes);
format!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! operator told "queued" reads the answer from the queue view later.

use axum::{extract::State, Json};
use rand::RngCore;
use rand::Rng;
use serde::Deserialize;
use serde_json::{json, Value};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ fn to_hex(bytes: &[u8]) -> String {
}

pub fn random_id(prefix: &str) -> String {
use rand::RngCore;
use rand::Rng;
let mut bytes = [0u8; 16];
rand::rng().fill_bytes(&mut bytes);
format!("{prefix}_{}", to_hex(&bytes))
Expand Down
Loading