chore(deps): update rand requirement from 0.8 to 0.9 (#226)

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-05-26 18:58:33 +08:00 • committed by GitHub
commit 0ce14186ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -19,7 +19,7 @@ tracing-subscriber = { version = "0.3", features = [
"fmt",
] }
futures = "0.3"
rand = { version = "0.8", features = ["std"] }
rand = { version = "0.9", features = ["std"] }
axum = { version = "0.8", features = ["macros"] }
schemars = { version = "0.8", optional = true }
reqwest = { version = "0.12", features = ["json"] }

View file

@ -11,7 +11,7 @@ use axum::{
response::{Html, IntoResponse, Redirect, Response},
routing::{get, post},
};
use rand::{Rng, distributions::Alphanumeric};
use rand::{Rng, distr::Alphanumeric};
use rmcp::transport::{
SseServer,
auth::{
@ -216,7 +216,7 @@ struct UserInfo {
}
fn generate_random_string(length: usize) -> String {
rand::thread_rng()
rand::rng()
.sample_iter(&Alphanumeric)
.take(length)
.map(char::from)