From 7b24df25e43022ca03d567483e21f5de8064dc19 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Tue, 24 Jan 2023 11:55:19 +0900 Subject: [PATCH] cli: remove redundant check for undefined "merge-tools" section The section should be defined by default. --- src/merge_tools.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/merge_tools.rs b/src/merge_tools.rs index 29253b9ab..765980314 100644 --- a/src/merge_tools.rs +++ b/src/merge_tools.rs @@ -421,11 +421,7 @@ impl MergeTool { /// as an executable name if no configuration found for that name. fn get_tool_config(settings: &UserSettings, name: &str) -> Result { const TABLE_KEY: &str = "merge-tools"; - let tools_table = match settings.config().get_table(TABLE_KEY) { - Ok(table) => table, - Err(ConfigError::NotFound(_)) => return Ok(MergeTool::with_program(name)), - Err(err) => return Err(err), - }; + let tools_table = settings.config().get_table(TABLE_KEY)?; if let Some(v) = tools_table.get(name) { let mut result: MergeTool = v .clone()