From 42efcc7cf67716e304a8747eb5df939c5d7fe606 Mon Sep 17 00:00:00 2001 From: Wataru Otsubo Date: Tue, 22 Apr 2025 16:39:15 +0900 Subject: [PATCH] refactor(XmlGitInfo): improve error msg --- src/io.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/io.rs b/src/io.rs index bdf712f..f87edc5 100644 --- a/src/io.rs +++ b/src/io.rs @@ -13,7 +13,7 @@ const ENVVAR_XML_GIT_SHA: &str = "XML_GIT_SHA"; #[derive(Debug, Error)] pub enum XmlGitInfoError { #[error("io error while getting xml git info: {msg} {source}")] - IOError { + GitCommandSpawnError { msg: &'static str, #[source] source: io::Error, @@ -25,8 +25,8 @@ pub enum XmlGitInfoError { } impl XmlGitInfoError { - fn io_error(e: io::Error, msg: &'static str) -> Self { - XmlGitInfoError::IOError { msg, source: e } + fn git_command_spawn_error(e: io::Error, msg: &'static str) -> Self { + XmlGitInfoError::GitCommandSpawnError { msg, source: e } } } @@ -44,7 +44,7 @@ pub(crate) fn get_xml_gitinfo(xml_path: &path::Path) -> Result Result Result