chore(deps): bump rand from 0.8.7 to 0.10.2 (#772)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregory Schier <gschier1990@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-11-01 16:30:49 -08:00
1 parent 143acdbd7e
commit 0489b67f6c
11 files changed
+26 -26

No files matched your search

+3 -3
View File
@@ -3,8 +3,8 @@ use crate::ui;
use crate::utils::http;
use base64::Engine as _;
use keyring::Entry;
use rand::RngCore;
use rand::rngs::OsRng;
use rand::TryRng;
use rand::rngs::SysRng;
use reqwest::Url;
use serde_json::Value;
use sha2::{Digest, Sha256};
@@ -443,7 +443,7 @@ fn delete_auth_token(environment: Environment) -> CommandResult {
fn random_hex(bytes: usize) -> String {
let mut data = vec![0_u8; bytes];
OsRng.fill_bytes(&mut data);
SysRng.try_fill_bytes(&mut data).expect("OS random source failed");
hex::encode(data)
}
+2 -2
View File
@@ -1,7 +1,7 @@
use crate::cli::McpArgs;
use crate::context::{CliContext, CliExecutionContext};
use crate::plugin_events::SendContexts;
use rand::Rng;
use rand::RngExt;
use std::net::{Ipv4Addr, SocketAddr};
use std::path::PathBuf;
use std::sync::Arc;
@@ -76,7 +76,7 @@ async fn serve_http(host: CliMcpHost, port: u16, token: Option<String>) -> Resul
}
fn generate_token() -> String {
hex::encode(rand::thread_rng().r#gen::<[u8; 32]>())
hex::encode(rand::rng().random::<[u8; 32]>())
}
/// Every workspace in the database is "open", and the global `--environment`
+4 -4
View File
@@ -3,7 +3,7 @@ use crate::context::CliContext;
use crate::ui;
use crate::utils::http;
use keyring::Entry;
use rand::Rng;
use rand::RngExt;
use rolldown::{
BundleEvent, Bundler, BundlerOptions, ExperimentalOptions, InputItem, LogLevel, OutputFormat,
Platform, WatchOption, Watcher, WatcherEvent,
@@ -724,9 +724,9 @@ fn random_name() -> String {
"yak", "yarn", "year", "yell", "yoke", "yoga", "yam", "yacht", "yodel",
];
let mut rng = rand::thread_rng();
let adjective = ADJECTIVES[rng.gen_range(0..ADJECTIVES.len())];
let noun = NOUNS[rng.gen_range(0..NOUNS.len())];
let mut rng = rand::rng();
let adjective = ADJECTIVES[rng.random_range(0..ADJECTIVES.len())];
let noun = NOUNS[rng.random_range(0..NOUNS.len())];
format!("{adjective}-{noun}")
}