chore: 更新 rust 依赖 (#391)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-07-11 20:44:38 +08:00
committed by GitHub
parent 2837bb5234
commit c8f7a2267d
4 changed files with 354 additions and 222 deletions

544
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@ async-trait = "0.1.88"
axum = { version = "0.8.4", features = ["macros", "ws"] }
built = { version = "0.7.7", features = ["git2", "chrono"] }
chrono = { version = "0.4.41", features = ["serde"] }
clap = { version = "4.5.38", features = ["env", "string"] }
clap = { version = "4.5.41", features = ["env", "string"] }
cookie = "0.18.1"
cow-utils = "0.1.3"
dashmap = "6.1.0"
@@ -36,15 +36,15 @@ git2 = { version = "0.20.2", features = [], default-features = false }
handlebars = "6.3.2"
hex = "0.4.3"
leaky-bucket = "1.1.2"
md5 = "0.7.0"
memchr = "2.7.4"
md5 = "0.8.0"
memchr = "2.7.5"
once_cell = "1.21.3"
parking_lot = "0.12.4"
prost = "0.13.5"
quick-xml = { version = "0.37.5", features = ["async-tokio"] }
rand = "0.8.5"
prost = "0.14.1"
quick-xml = { version = "0.38.0", features = ["async-tokio"] }
rand = "0.9.1"
regex = "1.11.1"
reqwest = { version = "0.12.15", features = [
reqwest = { version = "0.12.22", features = [
"charset",
"cookies",
"gzip",
@@ -53,24 +53,24 @@ reqwest = { version = "0.12.15", features = [
"rustls-tls",
"stream",
], default-features = false }
rsa = { version = "0.9.8", features = ["sha2"] }
rsa = { version = "0.10.0-rc.3", features = ["sha2"] }
rust-embed-for-web = { git = "https://github.com/amtoaer/rust-embed-for-web", tag = "v1.0.0" }
sea-orm = { version = "1.1.11", features = [
sea-orm = { version = "1.1.13", features = [
"macros",
"runtime-tokio-rustls",
"sqlx-sqlite",
] }
sea-orm-migration = { version = "1.1.11", features = [] }
sea-orm-migration = { version = "1.1.13", features = [] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_urlencoded = "0.7.1"
strum = { version = "0.27.1", features = ["derive"] }
sysinfo = "0.35.2"
sysinfo = "0.36.0"
thiserror = "2.0.12"
tokio = { version = "1.45.0", features = ["full"] }
tokio = { version = "1.46.1", features = ["full"] }
tokio-stream = { version = "0.1.17", features = ["sync"] }
tokio-util = { version = "0.7.15", features = ["io", "rt"] }
toml = "0.8.22"
toml = "0.9.1"
tower = "0.5.2"
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["chrono", "json"] }

View File

@@ -100,7 +100,7 @@ JNrRuoEUXpabUzGB8QIDAQAB
.expect("fail to decode public key");
let ts = chrono::Local::now().timestamp_millis();
let data = format!("refresh_{}", ts).into_bytes();
let mut rng = rand::rngs::OsRng;
let mut rng = rand::rng();
let encrypted = key
.encrypt(&mut rng, Oaep::new::<Sha256>(), &data)
.expect("fail to encrypt");

View File

@@ -1,4 +1,4 @@
use rand::seq::SliceRandom;
use rand::seq::IndexedRandom;
pub(super) fn default_time_format() -> String {
"%Y-%m-%d".to_string()
@@ -7,7 +7,7 @@ pub(super) fn default_time_format() -> String {
/// 默认的 auth_token 实现,生成随机 16 位字符串
pub(super) fn default_auth_token() -> String {
let byte_choices = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=";
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
(0..16)
.map(|_| *(byte_choices.choose(&mut rng).expect("choose byte failed")) as char)
.collect()