Merge pull request #3 from TheFunny/dependabot/cargo/rand-0.10.2

build(deps): bump rand from 0.8.8 to 0.10.2
This commit is contained in:
2026-09-17 17:05:30 +08:00
committed by GitHub
4 changed files with 5 additions and 12 deletions
Generated
+2 -8
View File
@@ -2548,12 +2548,6 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "want"
version = "0.3.1"
@@ -2830,7 +2824,7 @@ dependencies = [
"dotenv",
"html-escape",
"log",
"rand 0.8.8",
"rand 0.10.2",
"regex",
"reqwest",
"serde",
@@ -2855,7 +2849,7 @@ dependencies = [
"parking_lot",
"png",
"pretty_env_logger",
"rand 0.8.8",
"rand 0.10.2",
"rusqlite",
"serde",
"serde_json",
+1 -1
View File
@@ -14,7 +14,7 @@ bytes = "1"
zip = "8"
tempfile = "3"
thiserror = "2"
rand = "0.8"
rand = "0.10"
log = "0.4"
tokio = { version = "1.40", features = ["time"] }
+1 -1
View File
@@ -14,7 +14,7 @@ dotenv = "0.15"
url = "2.5.2"
html-escape = "0.2"
rusqlite = { version = "0.40", features = ["bundled"] }
rand = "0.8"
rand = "0.10"
tempfile = "3"
parking_lot = "0.12"
bytes = "1"
+1 -2
View File
@@ -17,7 +17,6 @@ use crate::link_cache::{CachedMedia, CachedMediaKind, CachedPost};
use crate::media_sender::MediaSender;
use input_media::{build_media_group, input_file_for, item_url};
use post_send::{cache_animation_send, cache_sent_task};
use rand::Rng;
use serde::{Deserialize, Serialize};
use std::sync::LazyLock;
use teloxide::prelude::*;
@@ -261,7 +260,7 @@ pub fn photos_first(items: Vec<MediaItemPayload>) -> Vec<MediaItemPayload> {
/// Exponential backoff with jitter, capped at 30s.
pub fn retry_delay_seconds(attempts: u32) -> f64 {
let jitter: f64 = rand::thread_rng().gen_range(0.2..0.8);
let jitter: f64 = rand::random_range(0.2..0.8);
(2f64.powi(attempts as i32) + jitter).min(30.0)
}