From 62c53197c4508240b47866037571c04dacd03db3 Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Tue, 29 Jul 2025 01:19:21 -0400 Subject: [PATCH] fix(cli): eliminate leak of version string --- Cargo.toml | 1 + crates/cli/src/main.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a8597f15..4c4be622 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,6 +109,7 @@ clap = { version = "4.5.41", features = [ "derive", "env", "help", + "string", "unstable-styles", ] } clap_complete = "4.5.55" diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index cb849f09..f0666f9a 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -1746,7 +1746,6 @@ fn run() -> Result<()> { || BUILD_VERSION.to_string(), |build_sha| format!("{BUILD_VERSION} ({build_sha})"), ); - let version: &'static str = Box::leak(version.into_boxed_str()); let cli = Command::new("tree-sitter") .help_template(