From 5b8dc506917591792ee6c9d5c48b2ec4fcfcbf18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:08:52 +0000 Subject: [PATCH 1/2] build(deps): bump rand from 0.8.5 to 0.9.3 in /cli Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.3. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/0.9.3/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.9.3) --- updated-dependencies: - dependency-name: rand dependency-version: 0.9.3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- cli/Cargo.lock | 31 ++++++++++++++++++++++++++++++- cli/Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/cli/Cargo.lock b/cli/Cargo.lock index e50f85de23aa3..93862f3137794 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -427,7 +427,7 @@ dependencies = [ "open", "opentelemetry", "pin-project", - "rand 0.8.5", + "rand 0.9.3", "regex", "reqwest", "rmp-serde", @@ -2230,6 +2230,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ec095654a25171c2124e9e3393a930bddbffdc939556c914957a4c3e0a87166" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -2250,6 +2260,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -2268,6 +2288,15 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rand_hc" version = "0.2.0" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 6f54ec61cbb58..0389746bbeca0 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -28,7 +28,7 @@ serde_json = "1.0.96" rmp-serde = "1.1.1" uuid = { version = "1.4", features = ["serde", "v4"] } dirs = "5.0.1" -rand = "0.8.5" +rand = "0.9.3" opentelemetry = { version = "0.19.0", features = ["rt-tokio"] } serde_bytes = "0.11.9" chrono = { version = "0.4.26", features = ["serde", "std", "clock"], default-features = false } From 8fd9a14a2532e379a4b9f8cd978957b7f6fb822f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:18:31 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix=20clippy=20lint=20warnings=20after=20ra?= =?UTF-8?q?nd=200.8.5=20=E2=86=92=200.9.3=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/8e6151a9-d6c4-42c0-9e9e-e8e384b8ce48 Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> --- cli/src/tunnels/challenge.rs | 8 ++++---- cli/src/tunnels/code_server.rs | 2 +- cli/src/tunnels/dev_tunnels.rs | 4 ++-- cli/src/tunnels/protocol.rs | 9 ++------- cli/src/update_service.rs | 2 +- cli/src/util/io.rs | 2 +- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/cli/src/tunnels/challenge.rs b/cli/src/tunnels/challenge.rs index 81540004844e2..d15abed2cf8e6 100644 --- a/cli/src/tunnels/challenge.rs +++ b/cli/src/tunnels/challenge.rs @@ -5,8 +5,8 @@ #[cfg(not(feature = "vsda"))] pub fn create_challenge() -> String { - use rand::distributions::{Alphanumeric, DistString}; - Alphanumeric.sample_string(&mut rand::thread_rng(), 16) + use rand::distr::{Alphanumeric, SampleString}; + Alphanumeric.sample_string(&mut rand::rng(), 16) } #[cfg(not(feature = "vsda"))] @@ -26,8 +26,8 @@ pub fn verify_challenge(challenge: &str, response: &str) -> bool { #[cfg(feature = "vsda")] pub fn create_challenge() -> String { - use rand::distributions::{Alphanumeric, DistString}; - let str = Alphanumeric.sample_string(&mut rand::thread_rng(), 16); + use rand::distr::{Alphanumeric, SampleString}; + let str = Alphanumeric.sample_string(&mut rand::rng(), 16); vsda::create_new_message(&str) } diff --git a/cli/src/tunnels/code_server.rs b/cli/src/tunnels/code_server.rs index bbabadcf90a20..ffabbad19c433 100644 --- a/cli/src/tunnels/code_server.rs +++ b/cli/src/tunnels/code_server.rs @@ -23,7 +23,7 @@ use crate::util::http::{self, BoxedHttp}; use crate::util::io::SilentCopyProgress; use crate::util::machine::process_exists; use crate::util::prereqs::skip_requirements_check; -use crate::{debug, info, log, spanf, trace, warning}; +use crate::log; use lazy_static::lazy_static; use opentelemetry::KeyValue; use regex::Regex; diff --git a/cli/src/tunnels/dev_tunnels.rs b/cli/src/tunnels/dev_tunnels.rs index 0168ee60d8965..bc043cd62af3b 100644 --- a/cli/src/tunnels/dev_tunnels.rs +++ b/cli/src/tunnels/dev_tunnels.rs @@ -11,7 +11,7 @@ use crate::util::errors::{ WrappedError, }; use crate::util::input::prompt_placeholder; -use crate::{debug, info, log, spanf, trace, warning}; +use crate::log; use async_trait::async_trait; use futures::future::BoxFuture; use futures::{FutureExt, TryFutureExt}; @@ -694,7 +694,7 @@ impl DevTunnels { let recyclable = existing_tunnels .iter() .filter(|t| !tunnel_has_host_connection(t)) - .choose(&mut rand::thread_rng()); + .choose(&mut rand::rng()); match recyclable { Some(tunnel) => { diff --git a/cli/src/tunnels/protocol.rs b/cli/src/tunnels/protocol.rs index 3654826c57ebe..0c6329f30439f 100644 --- a/cli/src/tunnels/protocol.rs +++ b/cli/src/tunnels/protocol.rs @@ -299,9 +299,10 @@ pub enum PortPrivacy { Private, } -#[derive(Serialize, Deserialize, PartialEq, Copy, Eq, Clone, Debug)] +#[derive(Serialize, Deserialize, PartialEq, Copy, Eq, Clone, Debug, Default)] #[serde(rename_all = "lowercase")] pub enum PortProtocol { + #[default] Auto, Http, Https, @@ -313,12 +314,6 @@ impl std::fmt::Display for PortProtocol { } } -impl Default for PortProtocol { - fn default() -> Self { - Self::Auto - } -} - impl PortProtocol { pub fn to_contract_str(&self) -> &'static str { match *self { diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs index 55f1dadccdf67..de977b736b20a 100644 --- a/cli/src/update_service.rs +++ b/cli/src/update_service.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; use crate::{ constants::VSCODE_CLI_UPDATE_ENDPOINT, - debug, log, options, spanf, + log, options, util::{ errors::{wrap, AnyError, CodeError, WrappedError}, http::{BoxedHttp, SimpleResponse}, diff --git a/cli/src/util/io.rs b/cli/src/util/io.rs index 4b8118a219f81..2de2a72583ea9 100644 --- a/cli/src/util/io.rs +++ b/cli/src/util/io.rs @@ -310,7 +310,7 @@ mod tests { .truncate(true) .open(&file_path) .unwrap(); - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); let mut written = vec![]; let base_line = "Elit ipsum cillum ex cillum. Adipisicing consequat cupidatat do proident ut in sunt Lorem ipsum tempor. Eiusmod ipsum Lorem labore exercitation sunt pariatur excepteur fugiat cillum velit cillum enim. Nisi Lorem cupidatat ad enim velit officia eiusmod esse tempor aliquip. Deserunt pariatur tempor in duis culpa esse sit nulla irure ullamco ipsum voluptate non laboris. Occaecat officia nulla officia mollit do aliquip reprehenderit ad incididunt.";