From 7f588f358d0470ac5c51da40194f2ca4e5be09e9 Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Wed, 15 Apr 2026 23:36:11 +0200 Subject: [PATCH] vcs: Box `DiffProvider::Git` member Clippy says it's currently 784 bytes. Given it's intended to be long lived, allocating to fix that is not an issue. --- helix-vcs/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/helix-vcs/src/lib.rs b/helix-vcs/src/lib.rs index 213435f4..3545b8b7 100644 --- a/helix-vcs/src/lib.rs +++ b/helix-vcs/src/lib.rs @@ -225,8 +225,13 @@ impl DiffProviderRegistry { match git::open_repo(repo_path, trust_full) { Ok(repo) => { let key = Arc::from(repo_path); - self.providers - .insert(Arc::clone(&key), DiffProvider::Git { repo, trust_full }); + self.providers.insert( + Arc::clone(&key), + DiffProvider::Git { + repo: Box::new(repo), + trust_full, + }, + ); Ok((key, PossibleDiffProvider::Git)) } Err(err) => Err(err), @@ -242,7 +247,7 @@ impl DiffProviderRegistry { pub enum DiffProvider { #[cfg(feature = "git")] Git { - repo: gix::ThreadSafeRepository, + repo: Box, trust_full: bool, }, } -- 2.51.2