diff --git a/cli/src/merge_tools/mod.rs b/cli/src/merge_tools/mod.rs index 91961e0b72..a7a52867bf 100644 --- a/cli/src/merge_tools/mod.rs +++ b/cli/src/merge_tools/mod.rs @@ -99,7 +99,14 @@ pub enum MergeToolConfigError { #[derive(Clone, Debug, Eq, PartialEq)] pub enum MergeTool { Builtin, - External(ExternalMergeTool), + // Boxed because ExternalMergeTool is big compared to the Builtin variant. + External(Box), +} + +impl MergeTool { + fn external(tool: ExternalMergeTool) -> Self { + MergeTool::External(Box::new(tool)) + } } /// Finds the appropriate tool for diff editing or merges @@ -130,7 +137,7 @@ fn get_tool_config(settings: &UserSettings, name: &str) -> Result