From 34495f5895e187fe858e5f33c0bb5fe0a4d50efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 8 May 2025 10:18:17 +0200 Subject: [PATCH] Migrate `opt-dist` to edition 2024 --- Cargo.lock | 1 - src/tools/opt-dist/Cargo.toml | 2 +- src/tools/opt-dist/src/main.rs | 5 ++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 83d7a6a9ab13..fa0fa33ea75a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2567,7 +2567,6 @@ dependencies = [ "humansize", "humantime", "log", - "serde", "serde_json", "sysinfo", "tabled", diff --git a/src/tools/opt-dist/Cargo.toml b/src/tools/opt-dist/Cargo.toml index 279b19d50577..dfa884bc3f77 100644 --- a/src/tools/opt-dist/Cargo.toml +++ b/src/tools/opt-dist/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "opt-dist" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] build_helper = { path = "../../build_helper" } diff --git a/src/tools/opt-dist/src/main.rs b/src/tools/opt-dist/src/main.rs index d5e6640fb430..1bb72431fe6c 100644 --- a/src/tools/opt-dist/src/main.rs +++ b/src/tools/opt-dist/src/main.rs @@ -361,7 +361,10 @@ fn execute_pipeline( fn main() -> anyhow::Result<()> { // Make sure that we get backtraces for easier debugging in CI - std::env::set_var("RUST_BACKTRACE", "1"); + unsafe { + // SAFETY: we are the only thread running at this point + std::env::set_var("RUST_BACKTRACE", "1"); + } env_logger::builder() .filter_level(LevelFilter::Info)